From: Kari Argillander <kari.argillander@gmail.com>
To: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: ntfs3@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fs/ntfs3: Forbid FALLOC_FL_PUNCH_HOLE for normal files
Date: Tue, 28 Sep 2021 21:32:32 +0300 [thread overview]
Message-ID: <20210928183232.qi63jh2feknm3e7t@kari-VirtualBox> (raw)
In-Reply-To: <fad6f129-c53f-d751-be43-c403b1031449@paragon-software.com>
On Tue, Sep 28, 2021 at 08:25:58PM +0300, Konstantin Komarov wrote:
> FALLOC_FL_PUNCH_HOLE isn't allowed with normal files.
But is this absolute or just for now it can't? In my mind this can be
done, but you are expert here. Please write about it here. This will
help who ever will implement this in future. Example why ntfs_zero_range
did not punch a hole for normal file. You did actually implement that
function for this purpose right?
> Fixes xfstest generic/016 021 022
Lot of grepping is done with these so use full format generic/xxx with
each of these.
Also this affects also to these, but I did not look if there is other
problems than punching.
generic/012
generic/177
generic/255
generic/316
Add fixes tag here.
> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
> ---
> fs/ntfs3/file.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c
> index 5fb3508e5422..02ca665baa5f 100644
> --- a/fs/ntfs3/file.c
> +++ b/fs/ntfs3/file.c
> @@ -587,8 +587,8 @@ static long ntfs_fallocate(struct file *file, int mode, loff_t vbo, loff_t len)
> truncate_pagecache(inode, vbo_down);
>
> if (!is_sparsed(ni) && !is_compressed(ni)) {
> - /* Normal file. */
> - err = ntfs_zero_range(inode, vbo, end);
> + /* Normal file, can't make hole. */
If this is just for now plese write example
/* TODO: Can't make hole to normal files yet. */
> + err = -EOPNOTSUPP;
> goto out;
> }
>
> --
> 2.33.0
>
prev parent reply other threads:[~2021-09-28 18:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-28 17:25 Konstantin Komarov
2021-09-28 18:32 ` Kari Argillander [this message]
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=20210928183232.qi63jh2feknm3e7t@kari-VirtualBox \
--to=kari.argillander@gmail.com \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ntfs3@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
all inboxes | Powered by JetHome®