linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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: Keep prealloc for all types of files
Date: Sun, 3 Oct 2021 21:33:54 +0300	[thread overview]
Message-ID: <20211003183354.sperk5m7ertakdfz@kari-VirtualBox> (raw)
In-Reply-To: <ed3dc0b6-2fd4-5be0-2815-9f2504d8e1b5@paragon-software.com>

On Fri, Oct 01, 2021 at 06:58:03PM +0300, Konstantin Komarov wrote:
> Fixes: xfstest generic/274

I would always hope at least couple sentence to commit message. It would
be easier if you do this in first place and I do not need to ask it
everytime. Again I'm straight away thinking why this was done this way
in a first place. There has to be reason. Was that reason totally wrong
in a first place? Does this patch has some drawbacks? Quick look it
looks it might have, but please write about it so reviewer job is little
easier and we get more meaningfull history.

This also again needs fixes tag with prober commit id as
this seems like a bug if this fix xfstests case.

> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
> ---
>  fs/ntfs3/attrib.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/fs/ntfs3/attrib.c b/fs/ntfs3/attrib.c
> index 8a00fa978f5f..e8c00dda42ad 100644
> --- a/fs/ntfs3/attrib.c
> +++ b/fs/ntfs3/attrib.c
> @@ -447,11 +447,8 @@ int attr_set_size(struct ntfs_inode *ni, enum ATTR_TYPE type,
>  again_1:
>  	align = sbi->cluster_size;
>  
> -	if (is_ext) {
> +	if (is_ext)
>  		align <<= attr_b->nres.c_unit;
> -		if (is_attr_sparsed(attr_b))
> -			keep_prealloc = false;
> -	}
>  
>  	old_valid = le64_to_cpu(attr_b->nres.valid_size);
>  	old_size = le64_to_cpu(attr_b->nres.data_size);
> @@ -461,9 +458,6 @@ int attr_set_size(struct ntfs_inode *ni, enum ATTR_TYPE type,
>  	new_alloc = (new_size + align - 1) & ~(u64)(align - 1);
>  	new_alen = new_alloc >> cluster_bits;
>  
> -	if (keep_prealloc && is_ext)
> -		keep_prealloc = false;
> -
>  	if (keep_prealloc && new_size < old_size) {
>  		attr_b->nres.data_size = cpu_to_le64(new_size);
>  		mi_b->dirty = true;
> -- 
> 2.33.0
> 

      reply	other threads:[~2021-10-03 18:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 15:58 [PATCH] fs/ntfs3: Keep prealloc for all types of files Konstantin Komarov
2021-10-03 18:33 ` 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=20211003183354.sperk5m7ertakdfz@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;
as well as URLs for NNTP newsgroup(s).