Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@manguebit.com>
To: David Howells <dhowells@redhat.com>
Cc: dhowells@redhat.com, Steve French <sfrench@samba.org>,
	Christian Brauner <brauner@kernel.org>,
	netfs@lists.linux.dev, v9fs@lists.linux.dev,
	linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org,
	ceph-devel@vger.kernel.org, linux-nfs@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] netfs: Fix undifferentiation of DIO reads from unbuffered reads
Date: Wed, 23 Apr 2025 19:49:49 -0300	[thread overview]
Message-ID: <2d912187be794438cf6a9f6e7e0d694b@manguebit.com> (raw)
In-Reply-To: <3064919.1745444289@warthog.procyon.org.uk>

David Howells <dhowells@redhat.com> writes:

> On cifs, "DIO reads" (specified by O_DIRECT) need to be differentiated from
> "unbuffered reads" (specified by cache=none in the mount parameters).  The
> difference is flagged in the protocol and the server may behave
> differently: Windows Server will, for example, mandate that DIO reads are
> block aligned.
>
> Fix this by adding a NETFS_UNBUFFERED_READ to differentiate this from
> NETFS_DIO_READ, parallelling the write differentiation that already exists.
>
> A further patch will be required to make cifs do something different,
> depending on the rreq->origin set.
>
> Fixes: 016dc8516aec ("netfs: Implement unbuffered/DIO read support")
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Paulo Alcantara <pc@manguebit.com>
> cc: Steve French <sfrench@samba.org>
> cc: netfs@lists.linux.dev
> cc: v9fs@lists.linux.dev
> cc: linux-afs@lists.infradead.org
> cc: linux-cifs@vger.kernel.org
> cc: ceph-devel@vger.kernel.org
> cc: linux-nfs@vger.kernel.org
> cc: linux-fsdevel@vger.kernel.org
> ---
>  fs/9p/vfs_addr.c             |    3 ++-
>  fs/afs/write.c               |    1 +
>  fs/ceph/addr.c               |    4 +++-
>  fs/netfs/direct_read.c       |    3 ++-
>  fs/netfs/main.c              |    1 +
>  fs/netfs/misc.c              |    1 +
>  fs/netfs/objects.c           |    1 +
>  fs/netfs/read_collect.c      |    7 +++++--
>  fs/nfs/fscache.c             |    1 +
>  fs/smb/client/file.c         |    3 ++-
>  include/linux/netfs.h        |    1 +
>  include/trace/events/netfs.h |    1 +
>  12 files changed, 21 insertions(+), 6 deletions(-)

Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>

  parent reply	other threads:[~2025-04-23 22:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23 21:38 [PATCH] netfs: Fix undifferentiation of DIO reads from unbuffered reads David Howells
2025-04-23 22:16 ` Viacheslav Dubeyko
2025-04-23 22:49 ` Paulo Alcantara [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-23  7:57 David Howells
2025-05-23  8:35 ` Christian Brauner

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=2d912187be794438cf6a9f6e7e0d694b@manguebit.com \
    --to=pc@manguebit.com \
    --cc=brauner@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dhowells@redhat.com \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=netfs@lists.linux.dev \
    --cc=sfrench@samba.org \
    --cc=v9fs@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox