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, 26 May 2011 16:51:51 +0200
From:	Jan Kara <jack@...e.cz>
To:	Manish Katiyar <mkatiyar@...il.com>
Cc:	Ted Ts'o <tytso@....edu>, Jan Kara <jack@...e.cz>,
	linux-ext4@...r.kernel.org
Subject: Re: [PATCH 2/3] jbd2 : Fix journal start by passing a parameter to
 specify if the caller can deal with ENOMEM

  Hi Manish,

On Wed 25-05-11 22:29:59, Manish Katiyar wrote:
> On Wed, May 25, 2011 at 7:22 PM, Ted Ts'o <tytso@....edu> wrote:
> > On Wed, May 25, 2011 at 10:13:33AM +0200, Jan Kara wrote:
> >> >
> >> >    ok.. I will do it as a separate patch.
> >>   Well, patch 2/3 does not really make too much sense without it (errok
> >> parameter isn't used) so there's no reason to do it as a separate patch.
> >> Just add it to this patch please.
> >
> > Agreed; right now this whole patch series is a no-op, since errok
> > isn't getting used for anything.  So fixing errok so it's passed to
> > start_this_handle() seems to be more in the category of "fix the
> > patch" more than anything else.
> >
> > One more thing; perhaps we should be passing in a integer so we can
> > pass in a flag word.  That way you don't need to have a fail_ok
> > variant.  It's a lot more obvious if you have a call:
> >
> >          handle = ext4_journal_start(inode, 1, JBD2_FAIL_OK);
> >
> > What we can also do is this:
> >
> >          handle = ext4_journal_start(inode, 1, JBD2_FAIL_OK | JBD2_TOPLEVEL);
> >
> > What JBD2_TOPLEVEL means is that caller is from a top-level file
> > system function, such as ext4_symlink() or ext4_chmod(), such that
> > start_this_handle() can use GFP_KERNEL instead of GFP_NOFS.  GFP_NOFS
> > is needed for any function that might get called by the direct reclaim
> > path (i.e., the writepage() function).  But for the top-level
> > symlink() or chmod() function, it's actually OK to allocate memory
> > using GFP_KERNEL, since there's no potential recursion problem.
> 
> Will it be more desirable to have the patch fixed as JBD2_FAIL_OK as
> you suggested above ? I have already
> fixed the patch to pass errok to start_this_handle() and then retry or
> not based on that, and was planning to send
> it. But if this needs to be fixed this way, then I will rework it then send.
  Well, I don't care much and Ted seems to like flags more. As he is the
maintainer, I guess just follow his advice ;).

								Honza
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ