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:	Wed, 14 Jan 2009 15:37:56 +0100
From:	Jan Kara <jack@...e.cz>
To:	Theodore Tso <tytso@....edu>,
	Fernando Luis Vázquez Cao 
	<fernando@....ntt.co.jp>, Alan Cox <alan@...rguk.ukuu.org.uk>,
	Pavel Machek <pavel@...e.cz>,
	kernel list <linux-kernel@...r.kernel.org>,
	Jens Axboe <jens.axboe@...cle.com>, sandeen@...hat.com
Subject: Re: ext2 + -osync: not as easy as it seems

On Wed 14-01-09 09:12:04, Theodore Tso wrote:
> On Wed, Jan 14, 2009 at 03:05:32PM +0100, Jan Kara wrote:
> > On Wed 14-01-09 08:21:46, Theodore Tso wrote:
> > > 
> > > If we optimize out the journal commit when there are no blocks
> > > attached to the transaction, we could change the patch to only force a
> > > flush if inode->i_state did not have I_DIRTY before the call to
> > > sync_inode().  Does that sound sane?
> >   Yes. And also add a flush in case of fdatasync().
> 
> Um, we have that already; the sync_inode() followed by
> blkdev_issue_flush() is the path taken by fdatasync(), I do believe.
  Maybe ext4-patch-queue changes that area but in Linus's tree I see:

  if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
         goto out;

  So if we just overwrite some data, we send them to disk via fdatawrite()
and then we quickly bail out from ext4_sync_file() without doing
blkdev_issue_flush().

> >   Well, I thought that a barrier, as an abstraction, only guarantees that
> > any IO which happened before the barrier hits the iron before any IO which
> > has been submitted after a barrier. This is actually enough for a
> > journalling to work correctly but it's not enough for fsync() guarantees.
> > But I might be wrong...
> 
> Ah, yes, that's what you're getting at.  True, but for better or for
> worse, we have no other interface other than blkdev_issue_flush().
> This will guarantee that the data has made it to the disk controller,
> but it won't necessarily guarantee that it will have made it onto the
> disk platter, as I understand things; but I don't think we have any
> other interfaces available to us at this point.
  As Jens wrote, it seems barrier guarantees more than I thought so we are
correct.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ