@@ -155,17 +155,13 @@ unsigned long nilfs_sufile_get_ncleansegs(struct inode *sufile)
155155 * of successfully modified segments from the head is stored in the
156156 * place @ndone points to.
157157 *
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.
169165 */
170166int nilfs_sufile_updatev (struct inode * sufile , __u64 * segnumv , size_t nsegs ,
171167 int create , size_t * ndone ,
@@ -272,10 +268,7 @@ int nilfs_sufile_update(struct inode *sufile, __u64 segnum, int create,
272268 * @start: minimum segment number of allocatable region (inclusive)
273269 * @end: maximum segment number of allocatable region (inclusive)
274270 *
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.
279272 */
280273int nilfs_sufile_set_alloc_range (struct inode * sufile , __u64 start , __u64 end )
281274{
@@ -300,17 +293,14 @@ int nilfs_sufile_set_alloc_range(struct inode *sufile, __u64 start, __u64 end)
300293 * @sufile: inode of segment usage file
301294 * @segnump: pointer to segment number
302295 *
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.
310298 *
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.
314304 */
315305int nilfs_sufile_alloc (struct inode * sufile , __u64 * segnump )
316306{
@@ -610,16 +600,13 @@ int nilfs_sufile_set_segment_usage(struct inode *sufile, __u64 segnum,
610600 * @sufile: inode of segment usage file
611601 * @sustat: pointer to a structure of segment usage statistics
612602 *
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.
619605 *
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.
623610 */
624611int nilfs_sufile_get_stat (struct inode * sufile , struct nilfs_sustat * sustat )
625612{
@@ -683,16 +670,12 @@ void nilfs_sufile_do_set_error(struct inode *sufile, __u64 segnum,
683670 * @start: start segment number (inclusive)
684671 * @end: end segment number (inclusive)
685672 *
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.
696679 */
697680static int nilfs_sufile_truncate_range (struct inode * sufile ,
698681 __u64 start , __u64 end )
@@ -787,16 +770,12 @@ static int nilfs_sufile_truncate_range(struct inode *sufile,
787770 * @sufile: inode of segment usage file
788771 * @newnsegs: new number of segments
789772 *
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.
800779 */
801780int nilfs_sufile_resize (struct inode * sufile , __u64 newnsegs )
802781{
@@ -939,14 +918,11 @@ ssize_t nilfs_sufile_get_suinfo(struct inode *sufile, __u64 segnum, void *buf,
939918 * segment usage accordingly. Only the fields indicated by the sup_flags
940919 * are updated.
941920 *
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.
950926 */
951927ssize_t nilfs_sufile_set_suinfo (struct inode * sufile , void * buf ,
952928 unsigned int supsz , size_t nsup )
@@ -1073,7 +1049,7 @@ ssize_t nilfs_sufile_set_suinfo(struct inode *sufile, void *buf,
10731049 * and start+len is rounded down. For each clean segment blkdev_issue_discard
10741050 * function is invoked.
10751051 *
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 .
10771053 */
10781054int nilfs_sufile_trim_fs (struct inode * sufile , struct fstrim_range * range )
10791055{
0 commit comments