[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221201132828.3ymp4e25myo2hmdm@riteshh-domain>
Date: Thu, 1 Dec 2022 18:58:28 +0530
From: "Ritesh Harjani (IBM)" <ritesh.list@...il.com>
To: Jan Kara <jack@...e.cz>
Cc: Ted Tso <tytso@....edu>, linux-ext4@...r.kernel.org,
Christoph Hellwig <hch@...radead.org>
Subject: Re: [PATCH 5/9] ext4: Add support for writepages calls that cannot
map blocks
On 22/12/01 12:50PM, Jan Kara wrote:
> > > + /*
> > > + * Writeout for transaction commit where we cannot
> > > + * modify metadata is simple. Just submit the page.
> > > + */
> > > + if (!mpd->can_map) {
> > > + if (ext4_page_nomap_can_writeout(page)) {
> > > + err = mpage_submit_page(mpd, page);
> > > + if (err < 0)
> > > + goto out;
> > > + } else {
> > > + unlock_page(page);
> > > + mpd->first_page++;
> >
> > We anyway should always have mpd->map.m_len = 0.
> > That means, we always set mpd->first_page = page->index above.
> > So this might not be useful. But I guess for consistency of the code,
> > or to avoid any future bugs, this isn't harmful to keep.
>
> Yes, it is mostly for consistency but it is also needed so that once we
> exit the loop, mpage_release_unused_pages() starts working from a correct
> page.
Oh yes! right.
-ritesh
Powered by blists - more mailing lists