@@ -47,17 +47,14 @@ static int nilfs_bmap_convert_error(struct nilfs_bmap *bmap,
4747 * @ptrp: place to store the value associated to @key
4848 *
4949 * Description: nilfs_bmap_lookup_at_level() finds a record whose key
50- * matches @key in the block at @level of the bmap.
51- *
52- * Return Value: On success, 0 is returned and the record associated with @key
53- * is stored in the place pointed by @ptrp. On error, one of the following
54- * negative error codes is returned.
55- *
56- * %-EIO - I/O error.
57- *
58- * %-ENOMEM - Insufficient amount of memory available.
59- *
60- * %-ENOENT - A record associated with @key does not exist.
50+ * matches @key in the block at @level of the bmap. The record associated
51+ * with @key is stored in the place pointed to by @ptrp.
52+ *
53+ * Return: 0 on success, or one of the following negative error codes on
54+ * failure:
55+ * * %-EIO - I/O error (including metadata corruption).
56+ * * %-ENOENT - A record associated with @key does not exist.
57+ * * %-ENOMEM - Insufficient memory available.
6158 */
6259int nilfs_bmap_lookup_at_level (struct nilfs_bmap * bmap , __u64 key , int level ,
6360 __u64 * ptrp )
@@ -138,14 +135,11 @@ static int nilfs_bmap_do_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr)
138135 * Description: nilfs_bmap_insert() inserts the new key-record pair specified
139136 * by @key and @rec into @bmap.
140137 *
141- * Return Value: On success, 0 is returned. On error, one of the following
142- * negative error codes is returned.
143- *
144- * %-EIO - I/O error.
145- *
146- * %-ENOMEM - Insufficient amount of memory available.
147- *
148- * %-EEXIST - A record associated with @key already exist.
138+ * Return: 0 on success, or one of the following negative error codes on
139+ * failure:
140+ * * %-EEXIST - A record associated with @key already exists.
141+ * * %-EIO - I/O error (including metadata corruption).
142+ * * %-ENOMEM - Insufficient memory available.
149143 */
150144int nilfs_bmap_insert (struct nilfs_bmap * bmap , __u64 key , unsigned long rec )
151145{
@@ -193,14 +187,11 @@ static int nilfs_bmap_do_delete(struct nilfs_bmap *bmap, __u64 key)
193187 * Description: nilfs_bmap_seek_key() seeks a valid key on @bmap
194188 * starting from @start, and stores it to @keyp if found.
195189 *
196- * Return Value: On success, 0 is returned. On error, one of the following
197- * negative error codes is returned.
198- *
199- * %-EIO - I/O error.
200- *
201- * %-ENOMEM - Insufficient amount of memory available.
202- *
203- * %-ENOENT - No valid entry was found
190+ * Return: 0 on success, or one of the following negative error codes on
191+ * failure:
192+ * * %-EIO - I/O error (including metadata corruption).
193+ * * %-ENOENT - No valid entry was found.
194+ * * %-ENOMEM - Insufficient memory available.
204195 */
205196int nilfs_bmap_seek_key (struct nilfs_bmap * bmap , __u64 start , __u64 * keyp )
206197{
@@ -236,14 +227,11 @@ int nilfs_bmap_last_key(struct nilfs_bmap *bmap, __u64 *keyp)
236227 * Description: nilfs_bmap_delete() deletes the key-record pair specified by
237228 * @key from @bmap.
238229 *
239- * Return Value: On success, 0 is returned. On error, one of the following
240- * negative error codes is returned.
241- *
242- * %-EIO - I/O error.
243- *
244- * %-ENOMEM - Insufficient amount of memory available.
245- *
246- * %-ENOENT - A record associated with @key does not exist.
230+ * Return: 0 on success, or one of the following negative error codes on
231+ * failure:
232+ * * %-EIO - I/O error (including metadata corruption).
233+ * * %-ENOENT - A record associated with @key does not exist.
234+ * * %-ENOMEM - Insufficient memory available.
247235 */
248236int nilfs_bmap_delete (struct nilfs_bmap * bmap , __u64 key )
249237{
@@ -290,12 +278,10 @@ static int nilfs_bmap_do_truncate(struct nilfs_bmap *bmap, __u64 key)
290278 * Description: nilfs_bmap_truncate() removes key-record pairs whose keys are
291279 * greater than or equal to @key from @bmap.
292280 *
293- * Return Value: On success, 0 is returned. On error, one of the following
294- * negative error codes is returned.
295- *
296- * %-EIO - I/O error.
297- *
298- * %-ENOMEM - Insufficient amount of memory available.
281+ * Return: 0 on success, or one of the following negative error codes on
282+ * failure:
283+ * * %-EIO - I/O error (including metadata corruption).
284+ * * %-ENOMEM - Insufficient memory available.
299285 */
300286int nilfs_bmap_truncate (struct nilfs_bmap * bmap , __u64 key )
301287{
@@ -330,12 +316,10 @@ void nilfs_bmap_clear(struct nilfs_bmap *bmap)
330316 * Description: nilfs_bmap_propagate() marks the buffers that directly or
331317 * indirectly refer to the block specified by @bh dirty.
332318 *
333- * Return Value: On success, 0 is returned. On error, one of the following
334- * negative error codes is returned.
335- *
336- * %-EIO - I/O error.
337- *
338- * %-ENOMEM - Insufficient amount of memory available.
319+ * Return: 0 on success, or one of the following negative error codes on
320+ * failure:
321+ * * %-EIO - I/O error (including metadata corruption).
322+ * * %-ENOMEM - Insufficient memory available.
339323 */
340324int nilfs_bmap_propagate (struct nilfs_bmap * bmap , struct buffer_head * bh )
341325{
@@ -362,22 +346,22 @@ void nilfs_bmap_lookup_dirty_buffers(struct nilfs_bmap *bmap,
362346
363347/**
364348 * nilfs_bmap_assign - assign a new block number to a block
365- * @bmap: bmap
366- * @bh: pointer to buffer head
349+ * @bmap: bmap
350+ * @bh: place to store a pointer to the buffer head to which a block
351+ * address is assigned (in/out)
367352 * @blocknr: block number
368- * @binfo: block information
353+ * @binfo: block information
369354 *
370355 * Description: nilfs_bmap_assign() assigns the block number @blocknr to the
371- * buffer specified by @bh.
372- *
373- * Return Value: On success, 0 is returned and the buffer head of a newly
374- * create buffer and the block information associated with the buffer are
375- * stored in the place pointed by @bh and @binfo, respectively. On error, one
376- * of the following negative error codes is returned.
377- *
378- * %-EIO - I/O error.
379- *
380- * %-ENOMEM - Insufficient amount of memory available.
356+ * buffer specified by @bh. The block information is stored in the memory
357+ * pointed to by @binfo, and the buffer head may be replaced as a block
358+ * address is assigned, in which case a pointer to the new buffer head is
359+ * stored in the memory pointed to by @bh.
360+ *
361+ * Return: 0 on success, or one of the following negative error codes on
362+ * failure:
363+ * * %-EIO - I/O error (including metadata corruption).
364+ * * %-ENOMEM - Insufficient memory available.
381365 */
382366int nilfs_bmap_assign (struct nilfs_bmap * bmap ,
383367 struct buffer_head * * bh ,
@@ -402,12 +386,10 @@ int nilfs_bmap_assign(struct nilfs_bmap *bmap,
402386 * Description: nilfs_bmap_mark() marks the block specified by @key and @level
403387 * as dirty.
404388 *
405- * Return Value: On success, 0 is returned. On error, one of the following
406- * negative error codes is returned.
407- *
408- * %-EIO - I/O error.
409- *
410- * %-ENOMEM - Insufficient amount of memory available.
389+ * Return: 0 on success, or one of the following negative error codes on
390+ * failure:
391+ * * %-EIO - I/O error (including metadata corruption).
392+ * * %-ENOMEM - Insufficient memory available.
411393 */
412394int nilfs_bmap_mark (struct nilfs_bmap * bmap , __u64 key , int level )
413395{
@@ -430,7 +412,7 @@ int nilfs_bmap_mark(struct nilfs_bmap *bmap, __u64 key, int level)
430412 * Description: nilfs_test_and_clear() is the atomic operation to test and
431413 * clear the dirty state of @bmap.
432414 *
433- * Return Value : 1 is returned if @bmap is dirty, or 0 if clear.
415+ * Return: 1 if @bmap is dirty, or 0 if clear.
434416 */
435417int nilfs_bmap_test_and_clear_dirty (struct nilfs_bmap * bmap )
436418{
@@ -490,10 +472,10 @@ static struct lock_class_key nilfs_bmap_mdt_lock_key;
490472 *
491473 * Description: nilfs_bmap_read() initializes the bmap @bmap.
492474 *
493- * Return Value: On success, 0 is returned. On error, the following negative
494- * error code is returned.
495- *
496- * %-ENOMEM - Insufficient amount of memory available.
475+ * Return: 0 on success, or one of the following negative error codes on
476+ * failure:
477+ * * %-EIO - I/O error (corrupted bmap).
478+ * * %-ENOMEM - Insufficient memory available.
497479 */
498480int nilfs_bmap_read (struct nilfs_bmap * bmap , struct nilfs_inode * raw_inode )
499481{
0 commit comments