private void updateCount ( INode [ ] inodes , int dsUpdateStartPos , int endPos , long nsDelta , long dsDelta , boolean checkQuota ) throws QuotaExceededException { if ( ! ready ) { // still intializing. do not check or update quotas. return ; } if ( endPos > inodes . length ) { endPos = inodes . length ; } if ( checkQuota ) { verifyQuota ( inodes , 0 , dsUpdateStartPos , endPos , nsDelta , dsDelta ) ; } for ( int i = 0 ; i < endPos ; i ++ ) { if ( inodes [ i ] . isQuotaSet ( ) ) { // a directory with quota INodeDirectoryWithQuota node = ( INodeDirectoryWithQuota ) inodes [ i ] ; if ( i >= dsUpdateStartPos ) { node . updateNumItemsInTree ( nsDelta , dsDelta ) ; } else { node . updateNumItemsInTree ( nsDelta , 0 ) ; } } } }
Update NS quota of each inode with quota in the inodes array from the position 0 to the position of endPos .