[BACK]Return to ffs_alloc.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / ufs / ffs

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/ufs/ffs/ffs_alloc.c between version 1.104.2.1 and 1.105

version 1.104.2.1, 2008/02/18 21:07:28 version 1.105, 2008/01/02 11:49:08
Line 112  extern const u_char * const fragtbl[];
Line 112  extern const u_char * const fragtbl[];
  *      inode for the file.   *      inode for the file.
  *   2) quadradically rehash into other cylinder groups, until an   *   2) quadradically rehash into other cylinder groups, until an
  *      available block is located.   *      available block is located.
  *  
  * => called with um_lock held  
  * => releases um_lock before returning  
  */   */
 int  int
 ffs_alloc(struct inode *ip, daddr_t lbn, daddr_t bpref, int size,  ffs_alloc(struct inode *ip, daddr_t lbn, daddr_t bpref, int size,
Line 206  nospace:
Line 203  nospace:
  * and new size is also specified. The allocator attempts to extend   * and new size is also specified. The allocator attempts to extend
  * the original block. Failing that, the regular block allocator is   * the original block. Failing that, the regular block allocator is
  * invoked to get an appropriate block.   * invoked to get an appropriate block.
  *  
  * => called with um_lock held  
  * => return with um_lock released  
  */   */
 int  int
 ffs_realloccg(struct inode *ip, daddr_t lbprev, daddr_t bpref, int osize,  ffs_realloccg(struct inode *ip, daddr_t lbprev, daddr_t bpref, int osize,
Line 676  fail:
Line 670  fail:
  *   1) allocate an inode in cylinder group 0.   *   1) allocate an inode in cylinder group 0.
  *   2) quadradically rehash into other cylinder groups, until an   *   2) quadradically rehash into other cylinder groups, until an
  *      available inode is located.   *      available inode is located.
  *  
  * => um_lock not held upon entry or return  
  */   */
 int  int
 ffs_valloc(struct vnode *pvp, int mode, kauth_cred_t cred,  ffs_valloc(struct vnode *pvp, int mode, kauth_cred_t cred,
Line 913  ffs_dirpref(struct inode *pip)
Line 905  ffs_dirpref(struct inode *pip)
  * contiguously allocate fs_maxcontig blocks.  The end of one of these   * contiguously allocate fs_maxcontig blocks.  The end of one of these
  * contiguous blocks and the beginning of the next is laid out   * contiguous blocks and the beginning of the next is laid out
  * contigously if possible.   * contigously if possible.
  *  
  * => um_lock held on entry and exit  
  */   */
 daddr_t  daddr_t
 ffs_blkpref_ufs1(struct inode *ip, daddr_t lbn, int indx,  ffs_blkpref_ufs1(struct inode *ip, daddr_t lbn, int indx,
Line 1011  ffs_blkpref_ufs2(struct inode *ip, daddr
Line 1001  ffs_blkpref_ufs2(struct inode *ip, daddr
  *   1) allocate the block in its requested cylinder group.   *   1) allocate the block in its requested cylinder group.
  *   2) quadradically rehash on the cylinder group number.   *   2) quadradically rehash on the cylinder group number.
  *   3) brute force search for a free block.   *   3) brute force search for a free block.
  *  
  * => called with um_lock held  
  * => returns with um_lock released on success, held on failure  
  *    (*allocator releases lock on success, retains lock on failure)  
  */   */
 /*VARARGS5*/  /*VARARGS5*/
 static daddr_t  static daddr_t
Line 1066  ffs_hashalloc(struct inode *ip, int cg, 
Line 1052  ffs_hashalloc(struct inode *ip, int cg, 
  *   *
  * Check to see if the necessary fragments are available, and   * Check to see if the necessary fragments are available, and
  * if they are, allocate them.   * if they are, allocate them.
  *  
  * => called with um_lock held  
  * => returns with um_lock released on success, held on failure  
  */   */
 static daddr_t  static daddr_t
 ffs_fragextend(struct inode *ip, int cg, daddr_t bprev, int osize, int nsize)  ffs_fragextend(struct inode *ip, int cg, daddr_t bprev, int osize, int nsize)
Line 1593  gotit:
Line 1576  gotit:
  * The specified block or fragment is placed back in the   * The specified block or fragment is placed back in the
  * free map. If a fragment is deallocated, a possible   * free map. If a fragment is deallocated, a possible
  * block reassembly is checked.   * block reassembly is checked.
  *  
  * => um_lock not held on entry or exit  
  */   */
 void  void
 ffs_blkfree(struct fs *fs, struct vnode *devvp, daddr_t bno, long size,  ffs_blkfree(struct fs *fs, struct vnode *devvp, daddr_t bno, long size,

Legend:
Removed from v.1.104.2.1  
changed lines
  Added in v.1.105

CVSweb <webmaster@jp.NetBSD.org>