From: Andrew Morton <akpm@linux-foundation.org>
To: Yufen Yu <yuyufen@huawei.com>
Cc: viro@zeniv.linux.org.uk, hughd@google.com, linux-mm@kvack.org,
linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org
Subject: Re: [PATCH] tmpfs: let lseek return ENXIO with a negative offset
Date: Wed, 7 Nov 2018 15:19:55 -0800 [thread overview]
Message-ID: <20181107151955.777fcbcf9a5932677e245287@linux-foundation.org> (raw)
In-Reply-To: <1540434176-14349-1-git-send-email-yuyufen@huawei.com>
On Thu, 25 Oct 2018 10:22:56 +0800 Yufen Yu <yuyufen@huawei.com> wrote:
> For now, the others filesystems, such as ext4, f2fs, ubifs,
> all of them return ENXIO when lseek with a negative offset.
When using SEEK_DATA and/or SEEK_HOLE, yes?
> It is better to let tmpfs return ENXIO too. After that, tmpfs
> can also pass generic/448.
generic/448 is, I assume, part of xfstests?
So I'll rewrite the changelog as follows. Please review carefully.
Subject: tmpfs: make lseek(SEEK_DATA/SEK_HOLE) return ENXIO with a negative offset
Other filesystems such as ext4, f2fs and ubifs all return ENXIO when
lseek (SEEK_DATA or SEEK_HOLE) requests a negative offset.
man 2 lseek says
: EINVAL whence is not valid. Or: the resulting file offset would be
: negative, or beyond the end of a seekable device.
:
: ENXIO whence is SEEK_DATA or SEEK_HOLE, and the file offset is beyond
: the end of the file.
Make tmpfs return ENXIO under these circumstances as well. After this,
tmpfs also passes xfstests's generic/448.
next prev parent reply other threads:[~2018-11-07 23:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-25 2:22 Yufen Yu
2018-11-01 7:13 ` William Kucharski
2018-11-07 23:19 ` Andrew Morton [this message]
2018-11-08 10:46 ` William Kucharski
2018-11-08 23:07 ` Andrew Morton
2018-11-09 3:52 ` William Kucharski
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=20181107151955.777fcbcf9a5932677e245287@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=yuyufen@huawei.com \
/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