aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/rgrp.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2012-04-11 13:03:52 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2012-04-24 11:44:31 -0400
commit886b1416752d7b00fd04468a7c3f036699bddc31 (patch)
treea4712907beda1004ad0a3ff665d4447e6518191e /fs/gfs2/rgrp.c
parent29c578f567eec57b8db761d7adf6512d2d3e8efe (diff)
GFS2: Fix function parameter comments in rgrp.c
This patch just fixes a bunch of function parameter comments. Slowly, over the years, the comments have gotten out of date (mostly my fault, as I haven't been good at keeping them up to date). This patch rectifies some of that. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/rgrp.c')
-rw-r--r--fs/gfs2/rgrp.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 55dd010b565c..5968eae9cf8f 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -119,6 +119,7 @@ static inline void gfs2_setbit(struct gfs2_rgrpd *rgd, unsigned char *buf1,
119 119
120/** 120/**
121 * gfs2_testbit - test a bit in the bitmaps 121 * gfs2_testbit - test a bit in the bitmaps
122 * @rgd: the resource group descriptor
122 * @buffer: the buffer that holds the bitmaps 123 * @buffer: the buffer that holds the bitmaps
123 * @buflen: the length (in bytes) of the buffer 124 * @buflen: the length (in bytes) of the buffer
124 * @block: the block to read 125 * @block: the block to read
@@ -180,7 +181,7 @@ static inline u64 gfs2_bit_search(const __le64 *ptr, u64 mask, u8 state)
180/** 181/**
181 * gfs2_bitfit - Search an rgrp's bitmap buffer to find a bit-pair representing 182 * gfs2_bitfit - Search an rgrp's bitmap buffer to find a bit-pair representing
182 * a block in a given allocation state. 183 * a block in a given allocation state.
183 * @buffer: the buffer that holds the bitmaps 184 * @buf: the buffer that holds the bitmaps
184 * @len: the length (in bytes) of the buffer 185 * @len: the length (in bytes) of the buffer
185 * @goal: start search at this block's bit-pair (within @buffer) 186 * @goal: start search at this block's bit-pair (within @buffer)
186 * @state: GFS2_BLKST_XXX the state of the block we're looking for. 187 * @state: GFS2_BLKST_XXX the state of the block we're looking for.
@@ -232,6 +233,7 @@ static u32 gfs2_bitfit(const u8 *buf, const unsigned int len,
232 233
233/** 234/**
234 * gfs2_bitcount - count the number of bits in a certain state 235 * gfs2_bitcount - count the number of bits in a certain state
236 * @rgd: the resource group descriptor
235 * @buffer: the buffer that holds the bitmaps 237 * @buffer: the buffer that holds the bitmaps
236 * @buflen: the length (in bytes) of the buffer 238 * @buflen: the length (in bytes) of the buffer
237 * @state: the state of the block we're looking for 239 * @state: the state of the block we're looking for
@@ -265,7 +267,6 @@ static u32 gfs2_bitcount(struct gfs2_rgrpd *rgd, const u8 *buffer,
265 267
266/** 268/**
267 * gfs2_rgrp_verify - Verify that a resource group is consistent 269 * gfs2_rgrp_verify - Verify that a resource group is consistent
268 * @sdp: the filesystem
269 * @rgd: the rgrp 270 * @rgd: the rgrp
270 * 271 *
271 */ 272 */
@@ -323,7 +324,8 @@ static inline int rgrp_contains_block(struct gfs2_rgrpd *rgd, u64 block)
323/** 324/**
324 * gfs2_blk2rgrpd - Find resource group for a given data/meta block number 325 * gfs2_blk2rgrpd - Find resource group for a given data/meta block number
325 * @sdp: The GFS2 superblock 326 * @sdp: The GFS2 superblock
326 * @n: The data block number 327 * @blk: The data block number
328 * @exact: True if this needs to be an exact match
327 * 329 *
328 * Returns: The resource group, or NULL if not found 330 * Returns: The resource group, or NULL if not found
329 */ 331 */
@@ -381,7 +383,7 @@ struct gfs2_rgrpd *gfs2_rgrpd_get_first(struct gfs2_sbd *sdp)
381 383
382/** 384/**
383 * gfs2_rgrpd_get_next - get the next RG 385 * gfs2_rgrpd_get_next - get the next RG
384 * @rgd: A RG 386 * @rgd: the resource group descriptor
385 * 387 *
386 * Returns: The next rgrp 388 * Returns: The next rgrp
387 */ 389 */
@@ -530,6 +532,7 @@ static int compute_bitstructs(struct gfs2_rgrpd *rgd)
530 532
531/** 533/**
532 * gfs2_ri_total - Total up the file system space, according to the rindex. 534 * gfs2_ri_total - Total up the file system space, according to the rindex.
535 * @sdp: the filesystem
533 * 536 *
534 */ 537 */
535u64 gfs2_ri_total(struct gfs2_sbd *sdp) 538u64 gfs2_ri_total(struct gfs2_sbd *sdp)
@@ -583,7 +586,8 @@ static int rgd_insert(struct gfs2_rgrpd *rgd)
583 586
584/** 587/**
585 * read_rindex_entry - Pull in a new resource index entry from the disk 588 * read_rindex_entry - Pull in a new resource index entry from the disk
586 * @gl: The glock covering the rindex inode 589 * @ip: The GFS2 inode
590 * @ra_state: The read-ahead state
587 * 591 *
588 * Returns: 0 on success, > 0 on EOF, error code otherwise 592 * Returns: 0 on success, > 0 on EOF, error code otherwise
589 */ 593 */
@@ -742,7 +746,7 @@ static void gfs2_rgrp_out(struct gfs2_rgrpd *rgd, void *buf)
742 746
743/** 747/**
744 * gfs2_rgrp_go_lock - Read in a RG's header and bitmaps 748 * gfs2_rgrp_go_lock - Read in a RG's header and bitmaps
745 * @rgd: the struct gfs2_rgrpd describing the RG to read in 749 * @gh: The glock holder for the resource group
746 * 750 *
747 * Read in all of a Resource Group's header and bitmap blocks. 751 * Read in all of a Resource Group's header and bitmap blocks.
748 * Caller must eventually call gfs2_rgrp_relse() to free the bitmaps. 752 * Caller must eventually call gfs2_rgrp_relse() to free the bitmaps.
@@ -802,7 +806,7 @@ fail:
802 806
803/** 807/**
804 * gfs2_rgrp_go_unlock - Release RG bitmaps read in with gfs2_rgrp_bh_get() 808 * gfs2_rgrp_go_unlock - Release RG bitmaps read in with gfs2_rgrp_bh_get()
805 * @rgd: the struct gfs2_rgrpd describing the RG to read in 809 * @gh: The glock holder for the resource group
806 * 810 *
807 */ 811 */
808 812
@@ -1041,6 +1045,8 @@ static inline u32 gfs2_bi2rgd_blk(struct gfs2_bitmap *bi, u32 blk)
1041/** 1045/**
1042 * try_rgrp_unlink - Look for any unlinked, allocated, but unused inodes 1046 * try_rgrp_unlink - Look for any unlinked, allocated, but unused inodes
1043 * @rgd: The rgrp 1047 * @rgd: The rgrp
1048 * @last_unlinked: block address of the last dinode we unlinked
1049 * @skip: block address we should explicitly not unlink
1044 * 1050 *
1045 * Returns: 0 if no error 1051 * Returns: 0 if no error
1046 * The inode, if one has been found, in inode. 1052 * The inode, if one has been found, in inode.
@@ -1105,7 +1111,7 @@ static void try_rgrp_unlink(struct gfs2_rgrpd *rgd, u64 *last_unlinked, u64 skip
1105/** 1111/**
1106 * get_local_rgrp - Choose and lock a rgrp for allocation 1112 * get_local_rgrp - Choose and lock a rgrp for allocation
1107 * @ip: the inode to reserve space for 1113 * @ip: the inode to reserve space for
1108 * @rgp: the chosen and locked rgrp 1114 * @last_unlinked: the last unlinked block
1109 * 1115 *
1110 * Try to acquire rgrp in way which avoids contending with others. 1116 * Try to acquire rgrp in way which avoids contending with others.
1111 * 1117 *
@@ -1174,6 +1180,7 @@ static void gfs2_blkrsv_put(struct gfs2_inode *ip)
1174/** 1180/**
1175 * gfs2_inplace_reserve - Reserve space in the filesystem 1181 * gfs2_inplace_reserve - Reserve space in the filesystem
1176 * @ip: the inode to reserve space for 1182 * @ip: the inode to reserve space for
1183 * @requested: the number of blocks to be reserved
1177 * 1184 *
1178 * Returns: errno 1185 * Returns: errno
1179 */ 1186 */
@@ -1272,7 +1279,6 @@ static unsigned char gfs2_get_block_type(struct gfs2_rgrpd *rgd, u64 block)
1272 * @rgd: the resource group descriptor 1279 * @rgd: the resource group descriptor
1273 * @goal: the goal block within the RG (start here to search for avail block) 1280 * @goal: the goal block within the RG (start here to search for avail block)
1274 * @state: GFS2_BLKST_XXX the before-allocation state to find 1281 * @state: GFS2_BLKST_XXX the before-allocation state to find
1275 * @dinode: TRUE if the first block we allocate is for a dinode
1276 * @rbi: address of the pointer to the bitmap containing the block found 1282 * @rbi: address of the pointer to the bitmap containing the block found
1277 * 1283 *
1278 * Walk rgrp's bitmap to find bits that represent a block in @state. 1284 * Walk rgrp's bitmap to find bits that represent a block in @state.
@@ -1286,8 +1292,7 @@ static unsigned char gfs2_get_block_type(struct gfs2_rgrpd *rgd, u64 block)
1286 * Returns: the block number found relative to the bitmap rbi 1292 * Returns: the block number found relative to the bitmap rbi
1287 */ 1293 */
1288 1294
1289static u32 rgblk_search(struct gfs2_rgrpd *rgd, u32 goal, 1295static u32 rgblk_search(struct gfs2_rgrpd *rgd, u32 goal, unsigned char state,
1290 unsigned char state,
1291 struct gfs2_bitmap **rbi) 1296 struct gfs2_bitmap **rbi)
1292{ 1297{
1293 struct gfs2_bitmap *bi = NULL; 1298 struct gfs2_bitmap *bi = NULL;
@@ -1756,7 +1761,6 @@ void gfs2_rlist_add(struct gfs2_inode *ip, struct gfs2_rgrp_list *rlist,
1756 * and initialize an array of glock holders for them 1761 * and initialize an array of glock holders for them
1757 * @rlist: the list of resource groups 1762 * @rlist: the list of resource groups
1758 * @state: the lock state to acquire the RG lock in 1763 * @state: the lock state to acquire the RG lock in
1759 * @flags: the modifier flags for the holder structures
1760 * 1764 *
1761 * FIXME: Don't use NOFAIL 1765 * FIXME: Don't use NOFAIL
1762 * 1766 *