From: Anna Schumaker <Anna.Schumaker@netapp.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: <bfields@fieldses.org>, <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] nfsd: Add ALLOCATE support
Date: Tue, 28 Oct 2014 15:09:21 -0400 [thread overview]
Message-ID: <544FE9E1.5070501@Netapp.com> (raw)
In-Reply-To: <20141028084108.GC25532@infradead.org>
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.
>
next prev parent reply other threads:[~2014-10-28 19:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 14:41 [PATCH v2 0/2] NFSD: Add ALLOCATE and DEALLOCATE support Anna.Schumaker
2014-10-24 14:41 ` [PATCH v2 1/2] nfsd: Add ALLOCATE support Anna.Schumaker
2014-10-28 8:41 ` Christoph Hellwig
2014-10-28 19:09 ` Anna Schumaker [this message]
2014-10-24 14:41 ` [PATCH v2 2/2] nfsd: Add DEALLOCATE support Anna.Schumaker
2014-10-28 8:37 ` [PATCH v2 0/2] NFSD: Add ALLOCATE and " Christoph Hellwig
2014-10-28 20:48 ` J. Bruce Fields
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=544FE9E1.5070501@Netapp.com \
--to=anna.schumaker@netapp.com \
--cc=bfields@fieldses.org \
--cc=hch@infradead.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.