All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ye Bin <yebin10@huawei.com>
To: <jack@suse.com>, <tytso@mit.edu>, <linux-ext4@vger.kernel.org>,
	<yebin10@huawei.com>
Subject: [PATCH 1/2] ext4: Add comment to BUFFER_FLAGS_DISCARD for search code
Date: Sat, 22 Aug 2020 16:22:17 +0800	[thread overview]
Message-ID: <20200822082218.2228697-2-yebin10@huawei.com> (raw)
In-Reply-To: <20200822082218.2228697-1-yebin10@huawei.com>

When we analyze the problem, we find that in the discard_buffer will
implicitly clear some bits, which bothered us for a while. Add notes
to comment so that we can't miss them when analyzing the code.

Signed-off-by: Ye Bin <yebin10@huawei.com>
---
 fs/buffer.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index c1501a3c5ebe..d05b94cc48c0 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1496,7 +1496,13 @@ EXPORT_SYMBOL(set_bh_page);
  * Called when truncating a buffer on a page completely.
  */
 
-/* Bits that are cleared during an invalidate */
+/* Bits that are cleared during an invalidate
+ * clear_buffer_mapped
+ * clear_buffer_req
+ * clear_buffer_new
+ * clear_buffer_delay
+ * clear_buffer_unwritten
+*/
 #define BUFFER_FLAGS_DISCARD \
 	(1 << BH_Mapped | 1 << BH_New | 1 << BH_Req | \
 	 1 << BH_Delay | 1 << BH_Unwritten)
-- 
2.25.4


  reply	other threads:[~2020-08-22  8:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-22  8:22 [PATCH 0/2] Fix race between do_invalidatepage and init_page_buffers Ye Bin
2020-08-22  8:22 ` Ye Bin [this message]
2020-08-22  8:22 ` [PATCH 2/2] jbd2: " Ye Bin
2020-08-24 15:51 ` [PATCH 0/2] " Jan Kara
2020-08-25  2:11   ` yebin
2020-08-25  8:41     ` Jan Kara
2020-11-20  3:36       ` Theodore Y. Ts'o
2020-11-23 16:54         ` Jan Kara

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=20200822082218.2228697-2-yebin10@huawei.com \
    --to=yebin10@huawei.com \
    --cc=jack@suse.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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.