All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hyunchul Lee <hyc.lee@gmail.com>
To: Showta Ishizaki <zakinko@snowrabbit.org>
Cc: Namjae Jeon <linkinjeon@kernel.org>,
	ntfs@lists.linux.dev, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ntfs: keep i_size of a directory equal to its index root
Date: Thu, 26 Nov 2026 11:01:06 +0900	[thread overview]
Message-ID: <aweS4uqvdtATt2gm@hyunchul-PC02> (raw)
In-Reply-To: <20261125-ntfs-01-v1@snowrabbit.org>

Hi Showta,

> diff --git a/fs/ntfs/index.c b/fs/ntfs/index.c
> index fe2a79b..73c8e6f 100644
> --- a/fs/ntfs/index.c
> +++ b/fs/ntfs/index.c
> @@ -1434,6 +1434,8 @@ retry:
>  		icx->idx_ni->data_size = ix_root_size;
>  		icx->idx_ni->initialized_size = ix_root_size;
>  		icx->idx_ni->allocated_size = (ix_root_size + 7) & ~7;
> +		/* As ntfs_ir_truncate() does; i_size kept the old length. */

Could you remove this comment?

> @@ -611,6 +611,13 @@ static struct ntfs_inode *__ntfs_create(const struct mnt_idmap *idmap, struct in
>  		err = ntfs_attr_open(ni, AT_INDEX_ROOT, I30, 4);
>  		if (err)
>  			goto err_out;
> +		/*
> +		 * ntfs_attr_open() sets data_size to the length of the new
> +		 * $INDEX_ROOT, as ntfs_read_locked_inode() does with i_size
> +		 * too.  i_size stayed at the 0 set above, so stat() gave 0
> +		 * until the directory was read back from disk.
> +		 */

Please remove this one as well.

> +		i_size_write(vi, ni->data_size);
>  	} else {
>  		/* Add DATA attribute to inode. */
>  		err = ntfs_attr_add(ni, AT_DATA, AT_UNNAMED, 0, NULL, 0);
> -- 
> 2.54.0 (Apple Git-157)
> 

-- 
Thanks,
Hyunchul

      parent reply	other threads:[~2026-11-26  2:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 14:18 [PATCH] ntfs: keep i_size of a directory equal to its index root Showta Ishizaki
2026-11-26  1:47 ` Hyunchul Lee
2026-11-26 15:50   ` [PATCH v2] " Showta Ishizaki
2026-11-26 22:27     ` Namjae Jeon
2026-11-26  1:51 ` [PATCH] " liubaolin
2026-11-26  2:01 ` Hyunchul Lee [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=aweS4uqvdtATt2gm@hyunchul-PC02 \
    --to=hyc.lee@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntfs@lists.linux.dev \
    --cc=zakinko@snowrabbit.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.