@@ -47,17 +47,14 @@ static int nilfs_bmap_convert_error(struct nilfs_bmap *bmap,
47
47
* @ptrp: place to store the value associated to @key
48
48
*
49
49
* 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.
61
58
*/
62
59
int nilfs_bmap_lookup_at_level (struct nilfs_bmap * bmap , __u64 key , int level ,
63
60
__u64 * ptrp )
@@ -138,14 +135,11 @@ static int nilfs_bmap_do_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr)
138
135
* Description: nilfs_bmap_insert() inserts the new key-record pair specified
139
136
* by @key and @rec into @bmap.
140
137
*
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.
149
143
*/
150
144
int nilfs_bmap_insert (struct nilfs_bmap * bmap , __u64 key , unsigned long rec )
151
145
{
@@ -193,14 +187,11 @@ static int nilfs_bmap_do_delete(struct nilfs_bmap *bmap, __u64 key)
193
187
* Description: nilfs_bmap_seek_key() seeks a valid key on @bmap
194
188
* starting from @start, and stores it to @keyp if found.
195
189
*
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.
204
195
*/
205
196
int nilfs_bmap_seek_key (struct nilfs_bmap * bmap , __u64 start , __u64 * keyp )
206
197
{
@@ -236,14 +227,11 @@ int nilfs_bmap_last_key(struct nilfs_bmap *bmap, __u64 *keyp)
236
227
* Description: nilfs_bmap_delete() deletes the key-record pair specified by
237
228
* @key from @bmap.
238
229
*
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.
247
235
*/
248
236
int nilfs_bmap_delete (struct nilfs_bmap * bmap , __u64 key )
249
237
{
@@ -290,12 +278,10 @@ static int nilfs_bmap_do_truncate(struct nilfs_bmap *bmap, __u64 key)
290
278
* Description: nilfs_bmap_truncate() removes key-record pairs whose keys are
291
279
* greater than or equal to @key from @bmap.
292
280
*
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.
299
285
*/
300
286
int nilfs_bmap_truncate (struct nilfs_bmap * bmap , __u64 key )
301
287
{
@@ -330,12 +316,10 @@ void nilfs_bmap_clear(struct nilfs_bmap *bmap)
330
316
* Description: nilfs_bmap_propagate() marks the buffers that directly or
331
317
* indirectly refer to the block specified by @bh dirty.
332
318
*
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.
339
323
*/
340
324
int nilfs_bmap_propagate (struct nilfs_bmap * bmap , struct buffer_head * bh )
341
325
{
@@ -362,22 +346,22 @@ void nilfs_bmap_lookup_dirty_buffers(struct nilfs_bmap *bmap,
362
346
363
347
/**
364
348
* 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)
367
352
* @blocknr: block number
368
- * @binfo: block information
353
+ * @binfo: block information
369
354
*
370
355
* 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.
381
365
*/
382
366
int nilfs_bmap_assign (struct nilfs_bmap * bmap ,
383
367
struct buffer_head * * bh ,
@@ -402,12 +386,10 @@ int nilfs_bmap_assign(struct nilfs_bmap *bmap,
402
386
* Description: nilfs_bmap_mark() marks the block specified by @key and @level
403
387
* as dirty.
404
388
*
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.
411
393
*/
412
394
int nilfs_bmap_mark (struct nilfs_bmap * bmap , __u64 key , int level )
413
395
{
@@ -430,7 +412,7 @@ int nilfs_bmap_mark(struct nilfs_bmap *bmap, __u64 key, int level)
430
412
* Description: nilfs_test_and_clear() is the atomic operation to test and
431
413
* clear the dirty state of @bmap.
432
414
*
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.
434
416
*/
435
417
int nilfs_bmap_test_and_clear_dirty (struct nilfs_bmap * bmap )
436
418
{
@@ -490,10 +472,10 @@ static struct lock_class_key nilfs_bmap_mdt_lock_key;
490
472
*
491
473
* Description: nilfs_bmap_read() initializes the bmap @bmap.
492
474
*
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.
497
479
*/
498
480
int nilfs_bmap_read (struct nilfs_bmap * bmap , struct nilfs_inode * raw_inode )
499
481
{
0 commit comments