mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: liubaolin <liubaolin12138@163.com>
To: Hongling Zeng <zenghongling@kylinos.cn>,
	linkinjeon@kernel.org, hyc.lee@gmail.com
Cc: ntfs@lists.linux.dev, linux-kernel@vger.kernel.org,
	zhongling0719@126.com
Subject: Re: [PATCH v13 0/7] ntfs: fix volume flag races and persist the recorded error state
Date: Thu, 17 Sep 2026 05:36:15 +0800	[thread overview]
Message-ID: <2a0a1afd-250b-4e8c-9356-3e98e71aa46b@163.com> (raw)
In-Reply-To: <20260915083252.812126-1-zenghongling@kylinos.cn>


After several rounds of review and Hongling's revisions, I think the 
series is now in good shape.

For the whole series:
Reviewed-by: Baolin Liu <liubaolin@kylinos.cn>

在 2026/9/15 16:32, Hongling Zeng 写道:
> Hi all,
> 
> The fs/ntfs runtime metadata-corruption paths only record the in-memory
> NVolErrors() flag, and the dirty-bit persistence used to race with
> ntfs_sync_fs(): a volume could end up with a clean on-disk dirty flag
> despite modification or recorded corruption, so chkdsk would not run on
> the next mount.  This series fixes that.
> 
>     1/6 makes the volume flag read-modify-write atomic under the
>        $Volume mrec_lock;
>     2/6 marks the volume dirty unconditionally on metadata changes,
>        dropping the racy caller-side checks in file.c and namei.c;
>     3/6 derives the on-disk dirty bit from the recorded error state at
>        the persistence points (sync_fs, remount-ro, put_super) and never
>        writes a hibernated volume;
>     4/6 persists the dirty state after the final put_super() commits so
>        late errors cannot unmount clean;
>     5/6 stops ntfs_sync_fs() from clearing VOLUME_IS_DIRTY: the clearing
>        moves to the quiescent transitions, a recorded error state is
>        still persisted at sync time, and sync now reports writeback and
>        flush errors instead of discarding them;
>     6/6 checks the dirty-state commit on remount and unmount.
>     7/7 ntfs: fail remount on sync errors and keep the dirty bit on
>        SB_FORCE
> 
> Changes in this revision, from the review:
> 
>    - 5/6: with the clearing gone from the sync path, a recorded error
>      state is persisted without ever clearing the bit, and
>      sync_blockdev() and blkdev_issue_flush() are both called with the
>      first error returned.
> 
>    - The IOCB_NOWAIT behavior and the per-operation $Volume mrec_lock
>      acquisition are outside the scope of this series.  The series keeps
>      the unconditional ntfs_set_volume_flags() call to preserve the
>      ordering that marks the volume dirty before the metadata
>      modification; a RWF_NOWAIT write still blocks in the marking when
>      the volume looks clean, as it already did on the base.  The
>      non-blocking and contended-lock handling (mutex_trylock, GFP_NOWAIT)
>      will be addressed in a separate follow-up patch.
> 
> Hongling Zeng (4):
>    ntfs: fix volume flag update races
>    ntfs: set the volume dirty bit unconditionally on metadata changes
>    ntfs: sync the volume dirty bit with the recorded error state
>    ntfs: persist the dirty state after the final put_super() commits
> 
>   fs/ntfs/file.c   |  20 ++---
>   fs/ntfs/namei.c  |  24 ++----
>   fs/ntfs/ntfs.h   |   1 -
>   fs/ntfs/super.c  | 191 ++++++++++++++++++++++++++++++++++++-----------
>   fs/ntfs/volume.h |   4 +
>   5 files changed, 171 insertions(+), 69 deletions(-)
> 


  parent reply	other threads:[~2026-09-16 21:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15  8:32 Hongling Zeng
2026-09-15  8:32 ` [PATCH v13 1/7] ntfs: fix volume flag update races Hongling Zeng
2026-09-16 20:23   ` liubaolin
2026-09-15  8:32 ` [PATCH v13 2/7] ntfs: set the volume dirty bit unconditionally on metadata changes Hongling Zeng
2026-09-16 20:23   ` liubaolin
2026-09-15  8:32 ` [PATCH v13 3/7] ntfs: sync the volume dirty bit with the recorded error state Hongling Zeng
2026-09-16 20:23   ` liubaolin
2026-09-16 21:17   ` liubaolin
2026-09-15  8:32 ` [PATCH v13 4/7] ntfs: persist the dirty state after the final put_super() commits Hongling Zeng
2026-09-16 21:18   ` liubaolin
2026-09-15  8:32 ` [PATCH v13 5/7] ntfs: do not clear the volume dirty bit during sync Hongling Zeng
2026-09-16 21:18   ` liubaolin
2026-09-15  8:32 ` [PATCH v13 6/7] ntfs: check the dirty-state commit on remount and unmount Hongling Zeng
2026-09-16 21:18   ` liubaolin
2026-09-15  8:32 ` [PATCH v13 7/7] ntfs: fail remount on sync errors and keep the dirty bit on SB_FORCE Hongling Zeng
2026-09-16 21:18   ` liubaolin
2026-09-16  0:42 ` [PATCH v13 0/7] ntfs: fix volume flag races and persist the recorded error state Hyunchul Lee
2026-09-16 21:36 ` liubaolin [this message]
2026-09-16 23:36 ` Namjae Jeon

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=2a0a1afd-250b-4e8c-9356-3e98e71aa46b@163.com \
    --to=liubaolin12138@163.com \
    --cc=hyc.lee@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntfs@lists.linux.dev \
    --cc=zenghongling@kylinos.cn \
    --cc=zhongling0719@126.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

all inboxes | Powered by JetHome®