@@ -155,17 +155,13 @@ unsigned long nilfs_sufile_get_ncleansegs(struct inode *sufile)
155
155
* of successfully modified segments from the head is stored in the
156
156
* place @ndone points to.
157
157
*
158
- * Return Value: On success, zero is returned. On error, one of the
159
- * following negative error codes is returned.
160
- *
161
- * %-EIO - I/O error.
162
- *
163
- * %-ENOMEM - Insufficient amount of memory available.
164
- *
165
- * %-ENOENT - Given segment usage is in hole block (may be returned if
166
- * @create is zero)
167
- *
168
- * %-EINVAL - Invalid segment usage number
158
+ * Return: 0 on success, or one of the following negative error codes on
159
+ * failure:
160
+ * * %-EINVAL - Invalid segment usage number
161
+ * * %-EIO - I/O error (including metadata corruption).
162
+ * * %-ENOENT - Given segment usage is in hole block (may be returned if
163
+ * @create is zero)
164
+ * * %-ENOMEM - Insufficient memory available.
169
165
*/
170
166
int nilfs_sufile_updatev (struct inode * sufile , __u64 * segnumv , size_t nsegs ,
171
167
int create , size_t * ndone ,
@@ -272,10 +268,7 @@ int nilfs_sufile_update(struct inode *sufile, __u64 segnum, int create,
272
268
* @start: minimum segment number of allocatable region (inclusive)
273
269
* @end: maximum segment number of allocatable region (inclusive)
274
270
*
275
- * Return Value: On success, 0 is returned. On error, one of the
276
- * following negative error codes is returned.
277
- *
278
- * %-ERANGE - invalid segment region
271
+ * Return: 0 on success, or %-ERANGE if segment range is invalid.
279
272
*/
280
273
int nilfs_sufile_set_alloc_range (struct inode * sufile , __u64 start , __u64 end )
281
274
{
@@ -300,17 +293,14 @@ int nilfs_sufile_set_alloc_range(struct inode *sufile, __u64 start, __u64 end)
300
293
* @sufile: inode of segment usage file
301
294
* @segnump: pointer to segment number
302
295
*
303
- * Description: nilfs_sufile_alloc() allocates a clean segment.
304
- *
305
- * Return Value: On success, 0 is returned and the segment number of the
306
- * allocated segment is stored in the place pointed by @segnump. On error, one
307
- * of the following negative error codes is returned.
308
- *
309
- * %-EIO - I/O error.
296
+ * Description: nilfs_sufile_alloc() allocates a clean segment, and stores
297
+ * its segment number in the place pointed to by @segnump.
310
298
*
311
- * %-ENOMEM - Insufficient amount of memory available.
312
- *
313
- * %-ENOSPC - No clean segment left.
299
+ * Return: 0 on success, or one of the following negative error codes on
300
+ * failure:
301
+ * * %-EIO - I/O error (including metadata corruption).
302
+ * * %-ENOMEM - Insufficient memory available.
303
+ * * %-ENOSPC - No clean segment left.
314
304
*/
315
305
int nilfs_sufile_alloc (struct inode * sufile , __u64 * segnump )
316
306
{
@@ -610,16 +600,13 @@ int nilfs_sufile_set_segment_usage(struct inode *sufile, __u64 segnum,
610
600
* @sufile: inode of segment usage file
611
601
* @sustat: pointer to a structure of segment usage statistics
612
602
*
613
- * Description: nilfs_sufile_get_stat() returns information about segment
614
- * usage.
615
- *
616
- * Return Value: On success, 0 is returned, and segment usage information is
617
- * stored in the place pointed by @sustat. On error, one of the following
618
- * negative error codes is returned.
603
+ * Description: nilfs_sufile_get_stat() retrieves segment usage statistics
604
+ * and stores them in the location pointed to by @sustat.
619
605
*
620
- * %-EIO - I/O error.
621
- *
622
- * %-ENOMEM - Insufficient amount of memory available.
606
+ * Return: 0 on success, or one of the following negative error codes on
607
+ * failure:
608
+ * * %-EIO - I/O error (including metadata corruption).
609
+ * * %-ENOMEM - Insufficient memory available.
623
610
*/
624
611
int nilfs_sufile_get_stat (struct inode * sufile , struct nilfs_sustat * sustat )
625
612
{
@@ -683,16 +670,12 @@ void nilfs_sufile_do_set_error(struct inode *sufile, __u64 segnum,
683
670
* @start: start segment number (inclusive)
684
671
* @end: end segment number (inclusive)
685
672
*
686
- * Return Value: On success, 0 is returned. On error, one of the
687
- * following negative error codes is returned.
688
- *
689
- * %-EIO - I/O error.
690
- *
691
- * %-ENOMEM - Insufficient amount of memory available.
692
- *
693
- * %-EINVAL - Invalid number of segments specified
694
- *
695
- * %-EBUSY - Dirty or active segments are present in the range
673
+ * Return: 0 on success, or one of the following negative error codes on
674
+ * failure:
675
+ * * %-EBUSY - Dirty or active segments are present in the range.
676
+ * * %-EINVAL - Invalid number of segments specified.
677
+ * * %-EIO - I/O error (including metadata corruption).
678
+ * * %-ENOMEM - Insufficient memory available.
696
679
*/
697
680
static int nilfs_sufile_truncate_range (struct inode * sufile ,
698
681
__u64 start , __u64 end )
@@ -787,16 +770,12 @@ static int nilfs_sufile_truncate_range(struct inode *sufile,
787
770
* @sufile: inode of segment usage file
788
771
* @newnsegs: new number of segments
789
772
*
790
- * Return Value: On success, 0 is returned. On error, one of the
791
- * following negative error codes is returned.
792
- *
793
- * %-EIO - I/O error.
794
- *
795
- * %-ENOMEM - Insufficient amount of memory available.
796
- *
797
- * %-ENOSPC - Enough free space is not left for shrinking
798
- *
799
- * %-EBUSY - Dirty or active segments exist in the region to be truncated
773
+ * Return: 0 on success, or one of the following negative error codes on
774
+ * failure:
775
+ * * %-EBUSY - Dirty or active segments exist in the region to be truncated.
776
+ * * %-EIO - I/O error (including metadata corruption).
777
+ * * %-ENOMEM - Insufficient memory available.
778
+ * * %-ENOSPC - Enough free space is not left for shrinking.
800
779
*/
801
780
int nilfs_sufile_resize (struct inode * sufile , __u64 newnsegs )
802
781
{
@@ -939,14 +918,11 @@ ssize_t nilfs_sufile_get_suinfo(struct inode *sufile, __u64 segnum, void *buf,
939
918
* segment usage accordingly. Only the fields indicated by the sup_flags
940
919
* are updated.
941
920
*
942
- * Return Value: On success, 0 is returned. On error, one of the
943
- * following negative error codes is returned.
944
- *
945
- * %-EIO - I/O error.
946
- *
947
- * %-ENOMEM - Insufficient amount of memory available.
948
- *
949
- * %-EINVAL - Invalid values in input (segment number, flags or nblocks)
921
+ * Return: 0 on success, or one of the following negative error codes on
922
+ * failure:
923
+ * * %-EINVAL - Invalid values in input (segment number, flags or nblocks).
924
+ * * %-EIO - I/O error (including metadata corruption).
925
+ * * %-ENOMEM - Insufficient memory available.
950
926
*/
951
927
ssize_t nilfs_sufile_set_suinfo (struct inode * sufile , void * buf ,
952
928
unsigned int supsz , size_t nsup )
@@ -1073,7 +1049,7 @@ ssize_t nilfs_sufile_set_suinfo(struct inode *sufile, void *buf,
1073
1049
* and start+len is rounded down. For each clean segment blkdev_issue_discard
1074
1050
* function is invoked.
1075
1051
*
1076
- * Return Value: On success, 0 is returned or negative error code, otherwise .
1052
+ * Return: 0 on success, or a negative error code on failure .
1077
1053
*/
1078
1054
int nilfs_sufile_trim_fs (struct inode * sufile , struct fstrim_range * range )
1079
1055
{
0 commit comments