From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Lukas Czerner <lczerner@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/7] xfs: Implement fallocate query support mode
Date: Mon, 18 Sep 2017 13:48:38 -0700 [thread overview]
Message-ID: <20170918204838.GW6540@magnolia> (raw)
In-Reply-To: <1505749947-26360-5-git-send-email-lczerner@redhat.com>
On Mon, Sep 18, 2017 at 05:52:24PM +0200, Lukas Czerner wrote:
> Return all fallcoate modes supported by xfs file system.
>
> Cc: linux-xfs@vger.kernel.org
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> ---
> fs/xfs/xfs_file.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
> index ebdd0bd..85e06c6 100644
> --- a/fs/xfs/xfs_file.c
> +++ b/fs/xfs/xfs_file.c
> @@ -746,7 +746,8 @@ xfs_file_write_iter(
> #define XFS_FALLOC_FL_SUPPORTED \
> (FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE | \
> FALLOC_FL_COLLAPSE_RANGE | FALLOC_FL_ZERO_RANGE | \
> - FALLOC_FL_INSERT_RANGE | FALLOC_FL_UNSHARE_RANGE)
> + FALLOC_FL_INSERT_RANGE | FALLOC_FL_UNSHARE_RANGE | \
> + FALLOC_FL_QUERY_SUPPORT | FALLOC_FL_PREALLOC_RANGE)
>
> STATIC long
> xfs_file_fallocate(
> @@ -768,6 +769,9 @@ xfs_file_fallocate(
> if (mode & ~XFS_FALLOC_FL_SUPPORTED)
> return -EOPNOTSUPP;
>
> + if (mode & FALLOC_FL_QUERY_SUPPORT)
> + return XFS_FALLOC_FL_SUPPORTED;
Urk, manpage update describing the goals of the query interface and how
this is supposed to work is needed.
Are we required to return only the mode flags that would reasonably be
expected to work on this file, or the fs in general? Do we return zero
if the file is immutable (I guess the fd has to be O_RDONLY?) or if the
fs is readonly?
And like hch said, why not {f,}pathconf?
--D
> +
> xfs_ilock(ip, iolock);
> error = xfs_break_layouts(inode, &iolock);
> if (error)
> --
> 2.7.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-09-18 20:48 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 15:52 [PATCH 0/7][RFC] Introduce fallocate query support mode Lukas Czerner
2017-09-18 15:52 ` [PATCH 1/7] vfs: " Lukas Czerner
2017-09-18 15:52 ` [PATCH 2/7] ext4: Implement " Lukas Czerner
2017-09-18 15:52 ` [PATCH 3/7] ext4: Remove unnecessary S_ISREG checks in fallocate operations Lukas Czerner
2017-09-18 15:52 ` [PATCH 4/7] xfs: Implement fallocate query support mode Lukas Czerner
2017-09-18 17:56 ` Christoph Hellwig
2017-09-19 3:28 ` OGAWA Hirofumi
2017-09-19 8:15 ` Lukas Czerner
2017-09-19 14:13 ` Christoph Hellwig
2017-09-18 20:48 ` Darrick J. Wong [this message]
2017-09-18 21:55 ` Andreas Dilger
2017-09-19 14:55 ` Theodore Ts'o
2017-09-19 15:33 ` Lukas Czerner
2017-09-19 15:55 ` Christoph Hellwig
2017-09-19 19:17 ` Florian Weimer
2017-09-19 20:37 ` Christoph Hellwig
2017-09-19 23:17 ` Theodore Ts'o
2017-09-21 13:17 ` pathconf syscall for linux Lukas Czerner
2017-09-21 13:49 ` Florian Weimer
2017-09-22 8:38 ` Lukas Czerner
2017-09-21 13:54 ` [PATCH 4/7] xfs: Implement fallocate query support mode Florian Weimer
2017-09-22 8:40 ` Lukas Czerner
2017-09-19 8:20 ` Lukas Czerner
2017-09-18 15:52 ` [PATCH 5/7] fat: " Lukas Czerner
2017-09-18 15:52 ` [PATCH 6/7] gfs2: " Lukas Czerner
2017-09-18 15:52 ` [PATCH 7/7] loop: Check for puch hole and zero range support specifically Lukas Czerner
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=20170918204838.GW6540@magnolia \
--to=darrick.wong@oracle.com \
--cc=lczerner@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).