3333 * @dofunc: concrete function of get/set metadata info
3434 *
3535 * Description: nilfs_ioctl_wrap_copy() gets/sets metadata info by means of
36- * calling dofunc() function on the basis of @argv argument.
37- *
38- * Return Value: On success, 0 is returned and requested metadata info
39- * is copied into userspace. On error, one of the following
40- * negative error codes is returned.
41- *
42- * %-EINVAL - Invalid arguments from userspace.
43- *
44- * %-ENOMEM - Insufficient amount of memory available.
45- *
46- * %-EFAULT - Failure during execution of requested operation.
36+ * calling dofunc() function on the basis of @argv argument. If successful,
37+ * the requested metadata information is copied to userspace memory.
38+ *
39+ * Return: 0 on success, or one of the following negative error codes on
40+ * failure:
41+ * * %-EFAULT - Failure during execution of requested operation.
42+ * * %-EINVAL - Invalid arguments from userspace.
43+ * * %-ENOMEM - Insufficient memory available.
4744 */
4845static int nilfs_ioctl_wrap_copy (struct the_nilfs * nilfs ,
4946 struct nilfs_argv * argv , int dir ,
@@ -190,13 +187,10 @@ static int nilfs_ioctl_getversion(struct inode *inode, void __user *argp)
190187 * given checkpoint between checkpoint and snapshot state. This ioctl
191188 * is used in chcp and mkcp utilities.
192189 *
193- * Return Value: On success, 0 is returned and mode of a checkpoint is
194- * changed. On error, one of the following negative error codes
195- * is returned.
196- *
197- * %-EPERM - Operation not permitted.
198- *
199- * %-EFAULT - Failure during checkpoint mode changing.
190+ * Return: 0 on success, or one of the following negative error codes on
191+ * failure:
192+ * %-EFAULT - Failure during checkpoint mode changing.
193+ * %-EPERM - Operation not permitted.
200194 */
201195static int nilfs_ioctl_change_cpmode (struct inode * inode , struct file * filp ,
202196 unsigned int cmd , void __user * argp )
@@ -244,13 +238,10 @@ static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp,
244238 * checkpoint from NILFS2 file system. This ioctl is used in rmcp
245239 * utility.
246240 *
247- * Return Value: On success, 0 is returned and a checkpoint is
248- * removed. On error, one of the following negative error codes
249- * is returned.
250- *
251- * %-EPERM - Operation not permitted.
252- *
253- * %-EFAULT - Failure during checkpoint removing.
241+ * Return: 0 on success, or one of the following negative error codes on
242+ * failure:
243+ * %-EFAULT - Failure during checkpoint removing.
244+ * %-EPERM - Operation not permitted.
254245 */
255246static int
256247nilfs_ioctl_delete_checkpoint (struct inode * inode , struct file * filp ,
@@ -296,7 +287,7 @@ nilfs_ioctl_delete_checkpoint(struct inode *inode, struct file *filp,
296287 * requested checkpoints. The NILFS_IOCTL_GET_CPINFO ioctl is used in
297288 * lscp utility and by nilfs_cleanerd daemon.
298289 *
299- * Return value: count of nilfs_cpinfo structures in output buffer.
290+ * Return: Count of nilfs_cpinfo structures in output buffer.
300291 */
301292static ssize_t
302293nilfs_ioctl_do_get_cpinfo (struct the_nilfs * nilfs , __u64 * posp , int flags ,
@@ -320,17 +311,14 @@ nilfs_ioctl_do_get_cpinfo(struct the_nilfs *nilfs, __u64 *posp, int flags,
320311 *
321312 * Description: nilfs_ioctl_get_cpstat() returns information about checkpoints.
322313 * The NILFS_IOCTL_GET_CPSTAT ioctl is used by lscp, rmcp utilities
323- * and by nilfs_cleanerd daemon.
314+ * and by nilfs_cleanerd daemon. The checkpoint statistics are copied to
315+ * the userspace memory pointed to by @argp.
324316 *
325- * Return Value: On success, 0 is returned, and checkpoints information is
326- * copied into userspace pointer @argp. On error, one of the following
327- * negative error codes is returned.
328- *
329- * %-EIO - I/O error.
330- *
331- * %-ENOMEM - Insufficient amount of memory available.
332- *
333- * %-EFAULT - Failure during getting checkpoints statistics.
317+ * Return: 0 on success, or one of the following negative error codes on
318+ * failure:
319+ * * %-EFAULT - Failure during getting checkpoints statistics.
320+ * * %-EIO - I/O error.
321+ * * %-ENOMEM - Insufficient memory available.
334322 */
335323static int nilfs_ioctl_get_cpstat (struct inode * inode , struct file * filp ,
336324 unsigned int cmd , void __user * argp )
@@ -363,7 +351,8 @@ static int nilfs_ioctl_get_cpstat(struct inode *inode, struct file *filp,
363351 * info about requested segments. The NILFS_IOCTL_GET_SUINFO ioctl is used
364352 * in lssu, nilfs_resize utilities and by nilfs_cleanerd daemon.
365353 *
366- * Return value: count of nilfs_suinfo structures in output buffer.
354+ * Return: Count of nilfs_suinfo structures in output buffer on success,
355+ * or a negative error code on failure.
367356 */
368357static ssize_t
369358nilfs_ioctl_do_get_suinfo (struct the_nilfs * nilfs , __u64 * posp , int flags ,
@@ -387,17 +376,14 @@ nilfs_ioctl_do_get_suinfo(struct the_nilfs *nilfs, __u64 *posp, int flags,
387376 *
388377 * Description: nilfs_ioctl_get_sustat() returns segment usage statistics.
389378 * The NILFS_IOCTL_GET_SUSTAT ioctl is used in lssu, nilfs_resize utilities
390- * and by nilfs_cleanerd daemon.
391- *
392- * Return Value: On success, 0 is returned, and segment usage information is
393- * copied into userspace pointer @argp. On error, one of the following
394- * negative error codes is returned.
395- *
396- * %-EIO - I/O error.
397- *
398- * %-ENOMEM - Insufficient amount of memory available.
379+ * and by nilfs_cleanerd daemon. The requested segment usage information is
380+ * copied to the userspace memory pointed to by @argp.
399381 *
400- * %-EFAULT - Failure during getting segment usage statistics.
382+ * Return: 0 on success, or one of the following negative error codes on
383+ * failure:
384+ * * %-EFAULT - Failure during getting segment usage statistics.
385+ * * %-EIO - I/O error.
386+ * * %-ENOMEM - Insufficient memory available.
401387 */
402388static int nilfs_ioctl_get_sustat (struct inode * inode , struct file * filp ,
403389 unsigned int cmd , void __user * argp )
@@ -430,7 +416,8 @@ static int nilfs_ioctl_get_sustat(struct inode *inode, struct file *filp,
430416 * on virtual block addresses. The NILFS_IOCTL_GET_VINFO ioctl is used
431417 * by nilfs_cleanerd daemon.
432418 *
433- * Return value: count of nilfs_vinfo structures in output buffer.
419+ * Return: Count of nilfs_vinfo structures in output buffer on success, or
420+ * a negative error code on failure.
434421 */
435422static ssize_t
436423nilfs_ioctl_do_get_vinfo (struct the_nilfs * nilfs , __u64 * posp , int flags ,
@@ -457,7 +444,8 @@ nilfs_ioctl_do_get_vinfo(struct the_nilfs *nilfs, __u64 *posp, int flags,
457444 * about descriptors of disk block numbers. The NILFS_IOCTL_GET_BDESCS ioctl
458445 * is used by nilfs_cleanerd daemon.
459446 *
460- * Return value: count of nilfs_bdescs structures in output buffer.
447+ * Return: Count of nilfs_bdescs structures in output buffer on success, or
448+ * a negative error code on failure.
461449 */
462450static ssize_t
463451nilfs_ioctl_do_get_bdescs (struct the_nilfs * nilfs , __u64 * posp , int flags ,
@@ -494,19 +482,15 @@ nilfs_ioctl_do_get_bdescs(struct the_nilfs *nilfs, __u64 *posp, int flags,
494482 *
495483 * Description: nilfs_ioctl_do_get_bdescs() function returns information
496484 * about descriptors of disk block numbers. The NILFS_IOCTL_GET_BDESCS ioctl
497- * is used by nilfs_cleanerd daemon.
498- *
499- * Return Value: On success, 0 is returned, and disk block descriptors are
500- * copied into userspace pointer @argp. On error, one of the following
501- * negative error codes is returned.
502- *
503- * %-EINVAL - Invalid arguments from userspace.
485+ * is used by nilfs_cleanerd daemon. If successful, disk block descriptors
486+ * are copied to userspace pointer @argp.
504487 *
505- * %-EIO - I/O error.
506- *
507- * %-ENOMEM - Insufficient amount of memory available.
508- *
509- * %-EFAULT - Failure during getting disk block descriptors.
488+ * Return: 0 on success, or one of the following negative error codes on
489+ * failure:
490+ * * %-EFAULT - Failure during getting disk block descriptors.
491+ * * %-EINVAL - Invalid arguments from userspace.
492+ * * %-EIO - I/O error.
493+ * * %-ENOMEM - Insufficient memory available.
510494 */
511495static int nilfs_ioctl_get_bdescs (struct inode * inode , struct file * filp ,
512496 unsigned int cmd , void __user * argp )
@@ -540,16 +524,12 @@ static int nilfs_ioctl_get_bdescs(struct inode *inode, struct file *filp,
540524 * Description: nilfs_ioctl_move_inode_block() function registers data/node
541525 * buffer in the GC pagecache and submit read request.
542526 *
543- * Return Value: On success, 0 is returned. On error, one of the following
544- * negative error codes is returned.
545- *
546- * %-EIO - I/O error.
547- *
548- * %-ENOMEM - Insufficient amount of memory available.
549- *
550- * %-ENOENT - Requested block doesn't exist.
551- *
552- * %-EEXIST - Blocks conflict is detected.
527+ * Return: 0 on success, or one of the following negative error codes on
528+ * failure:
529+ * * %-EEXIST - Block conflict detected.
530+ * * %-EIO - I/O error.
531+ * * %-ENOENT - Requested block doesn't exist.
532+ * * %-ENOMEM - Insufficient memory available.
553533 */
554534static int nilfs_ioctl_move_inode_block (struct inode * inode ,
555535 struct nilfs_vdesc * vdesc ,
@@ -604,8 +584,8 @@ static int nilfs_ioctl_move_inode_block(struct inode *inode,
604584 * blocks that garbage collector specified with the array of nilfs_vdesc
605585 * structures and stores them into page caches of GC inodes.
606586 *
607- * Return Value : Number of processed nilfs_vdesc structures or
608- * error code, otherwise .
587+ * Return: Number of processed nilfs_vdesc structures on success, or
588+ * a negative error code on failure .
609589 */
610590static int nilfs_ioctl_move_blocks (struct super_block * sb ,
611591 struct nilfs_argv * argv , void * buf )
@@ -682,14 +662,11 @@ static int nilfs_ioctl_move_blocks(struct super_block *sb,
682662 * in the period from p_start to p_end, excluding p_end itself. The checkpoints
683663 * which have been already deleted are ignored.
684664 *
685- * Return Value: Number of processed nilfs_period structures or
686- * error code, otherwise.
687- *
688- * %-EIO - I/O error.
689- *
690- * %-ENOMEM - Insufficient amount of memory available.
691- *
692- * %-EINVAL - invalid checkpoints.
665+ * Return: Number of processed nilfs_period structures on success, or one of
666+ * the following negative error codes on failure:
667+ * * %-EINVAL - invalid checkpoints.
668+ * * %-EIO - I/O error.
669+ * * %-ENOMEM - Insufficient memory available.
693670 */
694671static int nilfs_ioctl_delete_checkpoints (struct the_nilfs * nilfs ,
695672 struct nilfs_argv * argv , void * buf )
@@ -717,14 +694,11 @@ static int nilfs_ioctl_delete_checkpoints(struct the_nilfs *nilfs,
717694 * Description: nilfs_ioctl_free_vblocknrs() function frees
718695 * the virtual block numbers specified by @buf and @argv->v_nmembs.
719696 *
720- * Return Value: Number of processed virtual block numbers or
721- * error code, otherwise.
722- *
723- * %-EIO - I/O error.
724- *
725- * %-ENOMEM - Insufficient amount of memory available.
726- *
727- * %-ENOENT - The virtual block number have not been allocated.
697+ * Return: Number of processed virtual block numbers on success, or one of the
698+ * following negative error codes on failure:
699+ * * %-EIO - I/O error.
700+ * * %-ENOENT - Unallocated virtual block number.
701+ * * %-ENOMEM - Insufficient memory available.
728702 */
729703static int nilfs_ioctl_free_vblocknrs (struct the_nilfs * nilfs ,
730704 struct nilfs_argv * argv , void * buf )
@@ -746,14 +720,11 @@ static int nilfs_ioctl_free_vblocknrs(struct the_nilfs *nilfs,
746720 * Description: nilfs_ioctl_mark_blocks_dirty() function marks
747721 * metadata file or data blocks as dirty.
748722 *
749- * Return Value: Number of processed block descriptors or
750- * error code, otherwise.
751- *
752- * %-ENOMEM - Insufficient memory available.
753- *
754- * %-EIO - I/O error
755- *
756- * %-ENOENT - the specified block does not exist (hole block)
723+ * Return: Number of processed block descriptors on success, or one of the
724+ * following negative error codes on failure:
725+ * * %-EIO - I/O error.
726+ * * %-ENOENT - Non-existent block (hole block).
727+ * * %-ENOMEM - Insufficient memory available.
757728 */
758729static int nilfs_ioctl_mark_blocks_dirty (struct the_nilfs * nilfs ,
759730 struct nilfs_argv * argv , void * buf )
@@ -858,7 +829,7 @@ int nilfs_ioctl_prepare_clean_segments(struct the_nilfs *nilfs,
858829 * from userspace. The NILFS_IOCTL_CLEAN_SEGMENTS ioctl is used by
859830 * nilfs_cleanerd daemon.
860831 *
861- * Return Value: On success, 0 is returned or error code, otherwise .
832+ * Return: 0 on success, or a negative error code on failure .
862833 */
863834static int nilfs_ioctl_clean_segments (struct inode * inode , struct file * filp ,
864835 unsigned int cmd , void __user * argp )
@@ -982,20 +953,14 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp,
982953 * and metadata are written out to the device when it successfully
983954 * returned.
984955 *
985- * Return Value: On success, 0 is retured. On errors, one of the following
986- * negative error code is returned.
987- *
988- * %-EROFS - Read only filesystem.
989- *
990- * %-EIO - I/O error
991- *
992- * %-ENOSPC - No space left on device (only in a panic state).
993- *
994- * %-ERESTARTSYS - Interrupted.
995- *
996- * %-ENOMEM - Insufficient memory available.
997- *
998- * %-EFAULT - Failure during execution of requested operation.
956+ * Return: 0 on success, or one of the following negative error codes on
957+ * failure:
958+ * * %-EFAULT - Failure during execution of requested operation.
959+ * * %-EIO - I/O error.
960+ * * %-ENOMEM - Insufficient memory available.
961+ * * %-ENOSPC - No space left on device (only in a panic state).
962+ * * %-ERESTARTSYS - Interrupted.
963+ * * %-EROFS - Read only filesystem.
999964 */
1000965static int nilfs_ioctl_sync (struct inode * inode , struct file * filp ,
1001966 unsigned int cmd , void __user * argp )
@@ -1029,7 +994,7 @@ static int nilfs_ioctl_sync(struct inode *inode, struct file *filp,
1029994 * @filp: file object
1030995 * @argp: pointer on argument from userspace
1031996 *
1032- * Return Value: On success, 0 is returned or error code, otherwise .
997+ * Return: 0 on success, or a negative error code on failure .
1033998 */
1034999static int nilfs_ioctl_resize (struct inode * inode , struct file * filp ,
10351000 void __user * argp )
@@ -1065,7 +1030,7 @@ static int nilfs_ioctl_resize(struct inode *inode, struct file *filp,
10651030 * checks the arguments from userspace and calls nilfs_sufile_trim_fs, which
10661031 * performs the actual trim operation.
10671032 *
1068- * Return Value: On success, 0 is returned or negative error code, otherwise .
1033+ * Return: 0 on success, or a negative error code on failure .
10691034 */
10701035static int nilfs_ioctl_trim_fs (struct inode * inode , void __user * argp )
10711036{
@@ -1107,7 +1072,7 @@ static int nilfs_ioctl_trim_fs(struct inode *inode, void __user *argp)
11071072 * of segments in bytes and upper limit of segments in bytes.
11081073 * The NILFS_IOCTL_SET_ALLOC_RANGE is used by nilfs_resize utility.
11091074 *
1110- * Return Value: On success, 0 is returned or error code, otherwise .
1075+ * Return: 0 on success, or a negative error code on failure .
11111076 */
11121077static int nilfs_ioctl_set_alloc_range (struct inode * inode , void __user * argp )
11131078{
@@ -1158,17 +1123,15 @@ static int nilfs_ioctl_set_alloc_range(struct inode *inode, void __user *argp)
11581123 * @dofunc: concrete function of getting metadata info
11591124 *
11601125 * Description: nilfs_ioctl_get_info() gets metadata info by means of
1161- * calling dofunc() function.
1126+ * calling dofunc() function. The requested metadata information is copied
1127+ * to userspace memory @argp.
11621128 *
1163- * Return Value: On success, 0 is returned and requested metadata info
1164- * is copied into userspace. On error, one of the following
1165- * negative error codes is returned.
1166- *
1167- * %-EINVAL - Invalid arguments from userspace.
1168- *
1169- * %-ENOMEM - Insufficient amount of memory available.
1170- *
1171- * %-EFAULT - Failure during execution of requested operation.
1129+ * Return: 0 on success, or one of the following negative error codes on
1130+ * failure:
1131+ * * %-EFAULT - Failure during execution of requested operation.
1132+ * * %-EINVAL - Invalid arguments from userspace.
1133+ * * %-EIO - I/O error.
1134+ * * %-ENOMEM - Insufficient memory available.
11721135 */
11731136static int nilfs_ioctl_get_info (struct inode * inode , struct file * filp ,
11741137 unsigned int cmd , void __user * argp ,
@@ -1208,18 +1171,14 @@ static int nilfs_ioctl_get_info(struct inode *inode, struct file *filp,
12081171 * encapsulated in nilfs_argv and updates the segment usage info
12091172 * according to the flags in nilfs_suinfo_update.
12101173 *
1211- * Return Value: On success, 0 is returned. On error, one of the
1212- * following negative error codes is returned.
1213- *
1214- * %-EPERM - Not enough permissions
1215- *
1216- * %-EFAULT - Error copying input data
1217- *
1218- * %-EIO - I/O error.
1219- *
1220- * %-ENOMEM - Insufficient amount of memory available.
1221- *
1222- * %-EINVAL - Invalid values in input (segment number, flags or nblocks)
1174+ * Return: 0 on success, or one of the following negative error codes on
1175+ * failure:
1176+ * * %-EEXIST - Block conflict detected.
1177+ * * %-EFAULT - Error copying input data.
1178+ * * %-EINVAL - Invalid values in input (segment number, flags or nblocks).
1179+ * * %-EIO - I/O error.
1180+ * * %-ENOMEM - Insufficient memory available.
1181+ * * %-EPERM - Not enough permissions.
12231182 */
12241183static int nilfs_ioctl_set_suinfo (struct inode * inode , struct file * filp ,
12251184 unsigned int cmd , void __user * argp )
0 commit comments