From: liubaolin <liubaolin12138@163.com>
To: Hyunchul Lee <hyc.lee@gmail.com>
Cc: linkinjeon@kernel.org, ntfs@lists.linux.dev,
linux-kernel@vger.kernel.org, Baolin Liu <liubaolin@kylinos.cn>
Subject: Re: [PATCH v2 2/5] ntfs: report attribute errors to fsnotify
Date: Thu, 17 Sep 2026 12:21:57 +0800 [thread overview]
Message-ID: <545e6e4c-d897-4248-a2c0-bbbe6f4fef45@163.com> (raw)
In-Reply-To: <aqpHhxKx_xiSoZZQ@hyunchul-PC02>
在 2026/9/16 15:38, Hyunchul Lee 写道:
> Hi Baolin,
>
>> folio_err_out:
>> @@ -3720,7 +3737,8 @@ static int ntfs_attr_update_meta(struct attr_record *a, struct ntfs_inode *ni,
>> static int __ntfs_attr_update_mapping_pairs(struct ntfs_inode *ni,
>> s64 from_vcn,
>> struct ntfs_inode *locked_ni,
>> - bool defer_attrlist)
>> + bool defer_attrlist,
>> + bool *error_reported)
>> {
>> struct ntfs_attr_search_ctx *ctx;
>> struct ntfs_inode *base_ni;
>> @@ -4086,8 +4104,11 @@ static int __ntfs_attr_update_mapping_pairs(struct ntfs_inode *ni,
>> return 0;
>>
>> put_err_out:
>> - if (ctx)
>> + if (ctx) {
>> + if (error_reported && ctx->error_reported)
>> + *error_reported = true;
>> ntfs_attr_put_search_ctx(ctx);
>> + }
>> return err;
>> }
>
> __ntfs_attr_update_mapping_pairs() does:
>
> ntfs_attr_put_search_ctx(ctx);
> ctx = NULL
>
> Therefore any later mapping or other errors can therefore lose report
> state and duplicate reports. And The error_reported boolean only tell
> us that some lower-level path has already emitted an error. Consequently
> a report can incorrectly suppress a separate report for a later rollback
> or resotre failure, even though that failure represents an independant
> filesystem integrity problem.
>
> Instead of carrying error_reported, would it be simpler to report each
> error at its detection point and let fanofify merge repeated error
> events? or would there be any alternatives?
>
Hi Hyunchul,
Thanks for the feedback. I agree that reporting errors at their
detection points and relying on fanotify's event merging is simpler.
I'll update the series accordingly and send v3.
Thanks,
Baolin.
next prev parent reply other threads:[~2026-09-17 4:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 2:23 [PATCH v2 0/5] ntfs: report filesystem errors through fsnotify Baolin Liu
2026-09-16 2:23 ` [PATCH v2 1/5] ntfs: report allocation metadata errors to fsnotify Baolin Liu
2026-09-16 2:23 ` [PATCH v2 2/5] ntfs: report attribute " Baolin Liu
2026-09-16 7:38 ` Hyunchul Lee
2026-09-17 4:21 ` liubaolin [this message]
2026-09-16 2:23 ` [PATCH v2 3/5] ntfs: report inode metadata " Baolin Liu
2026-09-16 2:23 ` [PATCH v2 4/5] ntfs: report MFT " Baolin Liu
2026-09-16 2:23 ` [PATCH v2 5/5] ntfs: report shutdown " Baolin Liu
2026-09-16 2:40 ` [PATCH v2 0/5] ntfs: report filesystem errors through fsnotify liubaolin
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=545e6e4c-d897-4248-a2c0-bbbe6f4fef45@163.com \
--to=liubaolin12138@163.com \
--cc=hyc.lee@gmail.com \
--cc=linkinjeon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liubaolin@kylinos.cn \
--cc=ntfs@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®