Re: [PATCH v11 3/4] xfs: Add proper versioning support to fs_quota_stat

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

 



On Thu, Jul 11, 2013 at 12:00:42AM -0500, Chandra Seetharaman wrote:
> Added appropriate pads and code for backward compatibility.
> 
> Copied over the old version as it is different from the newer padded
> version.
> 
> New callers of the system call have to set the version of the data
> structure being passed, and kernel will fill as much data as requested.
> 
> Signed-off-by: Chandra Seetharaman <sekharan@xxxxxxxxxx>

Oh, and I forgot to mention:

> +		/*
> +		 * For forward compatibility. Check against all supported
> +		 * versions, and if the version provided is not supported
> +		 * by the kernel, set to the highest version supported.
> +		 * For now only FS_QSTAT_VERSION_2 is supported.
> +		 */
> +		if (fqs.qs_version != FS_QSTAT_VERSION_2)
> +			fqs.qs_version = FS_QSTAT_VERSION_2;

New API, new version number and enforcement: if the version number
passed in from userspace  is not understood, -EINVAL or an
equivalent "parameter not understood" error should be returned.
If the kernel doesn't understand what it is being passed, then
there's no guarantee that anything quota info we return can be
understood by the caller.

And while I remember, we'll also need quotactl(2) man page updates
for the new API.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
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