Re: [PATCH v2 3/3] xfs_quota: additional changes to allow use on ext4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/21/16 10:34 PM, Eric Sandeen wrote:
> On 8/21/16 9:06 PM, Dave Chinner wrote:
>> On Tue, Aug 16, 2016 at 09:16:38AM -0500, Bill O'Donnell wrote:

...

>> static int
>> init_check_command(
>> 	const cmdinfo_t *ct)
>> {
>> 	if (!fspath)
>> 		return 1;
>>
>> 	/* Always run commands that we are told to skip here */
>> 	if (ct->flags & CMD_SKIP_CHECK)
>> 		return 1;
>>
>> 	/* if it's an XFS filesystem, always run the command */
>> 	if (!(fs_path->fs_flags & FS_FOREIGN))
>> 		return 1;
> 
> Sorry for the late review; thanks for getting on it, Dave - but,
> isn't "foreign ok" exactly == "skip check?"
> 
> The only check that gets skipped is the foreign check, so just
> setting FOREIGN_OK seems to accomplish the same thing without
> more flag complexity, no?

Oh, the subliminal brain reminded me that we want to be able to
issue help or quit whether or not we had the "-f" flag, regardless
of the filesystem, and that "foreign" isn't ok unless the -f flag
is set, so we do need a class of "always works" commands.

I guess that was the point of the patch, but I suppose some clarity
in comments or commitlog would help slow people like me.  ;)

Thanks,
-Eric

> Thanks,
> -Eric
> 
> 
>> 	/* If the user specified foreign filesysetms are ok, run it */
>> 	if (foreign_allowed &&
>> 	    (ct->flags & CMD_FLAG_FOREIGN_OK))
>> 		return 1;
>>
>> 	/* foreign filesystem and it's no a valid command! */
>> 	fprintf(stderr, _("%s command is for XFS filesystems only\n"),
>> 			ct->name);
>> 	return 0;
>> }
>>
>> Cheers,
>>
>> Dave.
>>
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs
> 

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux