diff options
author | Kevin Wolf <kwolf@redhat.com> | 2020-07-16 16:26:01 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-07-17 14:20:57 +0200 |
commit | 5edc85571e7b7269dce408735eba7507f18ac666 (patch) | |
tree | 08f0437cca3c6f6c5ff26543bdf169c925968579 /block/dmg-lzfse.c | |
parent | 9c60a5d1978e6dcf85c0e01b50e6f7f54ca09104 (diff) |
file-posix: Allow byte-aligned O_DIRECT with NFS
Since commit a6b257a08e3 ('file-posix: Handle undetectable alignment'),
we assume that if we open a file with O_DIRECT and alignment probing
returns 1, we just couldn't find out the real alignment requirement
because some filesystems make the requirement only for allocated blocks.
In this case, a safe default of 4k is used.
This is too strict for NFS, which does actually allow byte-aligned
requests even with O_DIRECT. Because we can't distinguish both cases
with generic code, let's just look at the file system magic and disable
s->needs_alignment for NFS. This way, O_DIRECT can still be used on NFS
for images that are not aligned to 4k.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200716142601.111237-3-kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/dmg-lzfse.c')
0 files changed, 0 insertions, 0 deletions