Re: [PATCH v2 1/2] nfsd: Add ALLOCATE support

Anna Schumaker
2014-10-28T19:09:24Z

On 10/28/2014 04:41 AM, Christoph Hellwig wrote:
>> + error = vfs_fallocate(file, flags, offset, len);
>> + if (error == -ENODEV)
>> + return nfserr_inval;
>> + else if (error < 0)
>> + return nfserrno(error);
>> + return nfserrno(commit_metadata(fhp));
>
>
> Shouldn't this be something like:
>
> error = vfs_fallocate(file, flags, offset, len);
> if (!error)
> error = commit_metadata(fhp);
>
> if (error == -ENODEV)
> return nfserr_inval;
> return nfserrno(error);

Sure. I'll post another version in the next few days (with the other patch included).

Thanks for the feedback!
Anna

>
> I think we really should move the ENODEV mapping to nfserrno, but
> this patch isn't the right place for that.
>