All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ritesh Harjani <riteshh@linux.ibm.com>
To: linux-ext4@vger.kernel.org
Cc: "zhangyi (F)" <yi.zhang@huawei.com>,
	yangerkun <yangerkun@huawei.com>,
	tytso@mit.edu, jack@suse.cz, dmonakhov@gmail.com,
	adilger@dilger.ca, bob.liu@oracle.com, wshilong@ddn.com
Subject: Re: [QUESTION] BUG_ON in ext4_mb_simple_scan_group
Date: Fri, 1 May 2020 03:55:57 +0530	[thread overview]
Message-ID: <20200430222558.805DEAE057@d06av26.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <1740a49b-a10d-1bd3-a070-d76e9eb62fb2@huawei.com>

>>
>>> If above is true, then may be we should not call
>>> "SetPageUptodate(page)", in case of an error reading block bitmap?
>>> Thoughts?
>>>
>> Yeah, it's better to set page uptodate only if all block bitmap buffers
>> are uptodate represent by this page.
> 
> 
> So I guess the *easier* thing to do here is to abort the loop which
> calls ext4_wait_block_bitmap() in ext4_mb_init_cache, similar to how
> the loop above it does (which calls for ext4_read_block_bitmap_nowait())
> 
> Since if any of the block bitmap buffer (which belongs to that page)
> could not be read properly, then we should not set the PageUptodate.
> (including for blocksize < pagesize where groups_per_page > 1) and
> no need of even setting up the in memory buddy and bitmap information
> (since we are anyway not going to use it).
> 
> Others can comment, if something else needs to be done?
> But I think over optimizing this logic for blocksize < pagesize
> may become an overkill? (since this mostly happens during an I/O error).
> 

Ok, so as I see this bug was possibly introduced to handle blocksize < 
pagesize case itself [1]. So it will make no sense to just optimize it
for blocksize == pagesize again. So I guess we should look into this
more closely rather then simply implementing above logic.

[1]: https://www.spinics.net/lists/linux-ext4/msg48111.html

So, I can get back to this some time later maybe.

-ritesh

      parent reply	other threads:[~2020-04-30 22:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16 14:19 [QUESTION] BUG_ON in ext4_mb_simple_scan_group yangerkun
2020-04-16 18:33 ` Ritesh Harjani
2020-04-17  2:06   ` zhangyi (F)
2020-04-17  3:26     ` Ritesh Harjani
2020-04-17  9:50       ` Jan Kara
2020-04-17 12:01       ` zhangyi (F)
2020-04-17 12:29         ` Ritesh Harjani
2020-04-30 22:25         ` Ritesh Harjani [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=20200430222558.805DEAE057@d06av26.portsmouth.uk.ibm.com \
    --to=riteshh@linux.ibm.com \
    --cc=adilger@dilger.ca \
    --cc=bob.liu@oracle.com \
    --cc=dmonakhov@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=wshilong@ddn.com \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.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 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.