lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ