lkml.org 
[lkml]   [2014]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/7] check for O_NONBLOCK in all read_iter instances
On Tue, Sep 16, 2014 at 03:27:41PM -0400, Jeff Moyer wrote:
> Christoph Hellwig <milosz@adfin.com> writes:
>
> Hrm, you're not Christoph...
>
> > Acked-by: Milosz Tanski <milosz@adfin.com>
> > ---
> > fs/ceph/file.c | 2 ++
> > fs/cifs/file.c | 6 ++++++
> > fs/nfs/file.c | 5 ++++-
> > fs/ocfs2/file.c | 6 ++++++
> > fs/pipe.c | 3 ++-
> > fs/read_write.c | 17 +++++++++++------
> > fs/xfs/xfs_file.c | 4 ++++
> > mm/shmem.c | 4 ++++
> > 8 files changed, 39 insertions(+), 8 deletions(-)
> >
> > diff --git a/fs/ceph/file.c b/fs/ceph/file.c
> > index 4776257..b62e3a5 100644
> > --- a/fs/ceph/file.c
> > +++ b/fs/ceph/file.c
> > @@ -808,6 +808,8 @@ again:
> > if ((got & (CEPH_CAP_FILE_CACHE|CEPH_CAP_FILE_LAZYIO)) == 0 ||
> > (iocb->ki_filp->f_flags & O_DIRECT) ||
> > (fi->flags & CEPH_F_SYNC)) {
> > + if (flags & O_NONBLOCK)
> > + return -EAGAIN;
>
> Again, the right return value for the O_DIRECT case is EINVAL.

Is it? We define -EAGAIN as it would block, which is defintively true
for O_DIRECT reads.


\
 
 \ /
  Last update: 2014-09-16 23:21    [W:0.110 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site