Date: Wed, 7 Jul 2010 08:17:30 GMT From: Zheng Liu <lz@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 180581 for review Message-ID: <201007070817.o678HULo045303@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@180581?ac=10 Change 180581 by lz@gnehzuil-freebsd on 2010/07/07 08:17:21 Correct some errors in comments. Affected files ... .. //depot/projects/soc2010/extfs/src/sys/fs/ext2fs/ext2_alloc.c#25 edit Differences ... ==== //depot/projects/soc2010/extfs/src/sys/fs/ext2fs/ext2_alloc.c#25 (text+ko) ==== @@ -82,25 +82,25 @@ * Allocate a block in the file system. * * By given preference: - * It checks whether inode has a reservation window and preference - * is within it. If so, it will try to allocate a free block from + * Check whether inode has a reservation window and preference + * is within it and try to allocate a free block from * this reservation window. - * Otherwise, it traverses RB tree to find a place, which is not - * in any window. then it inserts it to RB tree and tries to allocate - * a free block again. - * If fails, it will try to allocate a free block in other cylinder - * groups without perference. + * If not, traverse RB tree to find a place, which is not in + * any window and insert it to RB tree to try to allocate a + * free block again. + * If it fails, try to allocate a free block in other cylinder + * groups without preference. */ /* * Allocate a free block. * - * Firstly it checks whether reservation window is used. - * If it use reservation window, it will try to allocate a free - * block from the reservation window. If failed, it will traverse + * First check whether reservation window is used. + * If reservation window is used, try to allocate a free + * block from the reservation window. If it fails, traverse * the bitmap to find a free block. - * If it not use reservation window, it will try to allocate - * a free block by bpref. If failed, it will traverse the bitmap + * If reservation window is not used, try to allocate + * a free block by bpref. If it fails, traverse the bitmap * to find a free block. */ static u_long @@ -126,9 +126,9 @@ if (rp != NULL) { /* * If window's start is not in this cylinder group, - * try to allocate from the beginning of this group. - * Otherwise, try to allocate from the beginning of - * the window. + * try to allocate from the beginning, otherwise + * try to allocate from the beginning of the + * window. */ if (dtog(fs, rp->rsv_start) < cg) start = 0; @@ -136,9 +136,9 @@ start = rp->rsv_start; /* - * If window's end cross the end of this group, + * If window's end crosses the end of this group, * set end variable to the end of this group. - * Otherwise, set it to window's end. + * Otherwise, set it to the window's end. */ if (dtog(fs, rp->rsv_end) > cg) end = phy_blk(cg + 1, fs) - 1; @@ -198,7 +198,7 @@ M_EXT2NODE, M_WAITOK | M_ZERO); /* - * If malloc failed, we just do not use + * If malloc failed, we just do not use the * reservation window mechanism. */ if (rp == NULL) @@ -216,7 +216,7 @@ /* * Discard reservation window. * - * It is called at following locations: + * It is called during the following situations: * 1. free an inode * 2. sync inode * 3. truncate a file @@ -322,7 +322,7 @@ /* * Make the start of reservation window byte-aligned * in order to can find a free block with bit operations - * in ext2_search_next_block() function. + * in the ext2_search_next_block() function. */ cur = start & ~7; rsv = search; @@ -637,7 +637,7 @@ * Reallocate a sequence of blocks into a contiguous sequence of blocks. * * The vnode and an array of buffer pointers for a range of sequential - * logicar blocks to be made contiguous is given. The allocator attempts + * logical blocks to be made contiguous is given. The allocator attempts * to find a range of sequential blocks starting as close as possible to * an fs_rotdelay offset from the end of the allocation for the logical * block immediately preceding the current range. If successful, the
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007070817.o678HULo045303>