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] [day] [month] [year] [list]
Date:	Sun, 31 Jul 2011 21:53:34 -0700 (PDT)
From:	Sage Weil <sage@...dream.net>
To:	Christoph Hellwig <hch@...radead.org>
cc:	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, ceph-devel@...r.kernel.org
Subject: Re: [GIT PULL] Ceph updates for 3.1-rc1

On Sun, 31 Jul 2011, Christoph Hellwig wrote:
> On Tue, Jul 26, 2011 at 01:36:37PM -0700, Sage Weil wrote:
> > Sage Weil (19):
> >       ceph: add flags field to file_info
> >       ceph: add F_SYNC file flag to force sync (non-O_DIRECT) io
> 
> Can you document what the exact semantics of this flag are, and how
> they different from using O_SYNC/O_DSYNC.

I should document this... in the fs/ceph/ioctl.h?  Not sure where this 
normally goes.

The CEPH_F_SYNC flag forces synchronous reads/writes that bypass the page 
cache.  It's similar to O_DIRECT, but makes a copy of the data before 
doing the IO and does not have the alignment restrictions.

The real value is that it forces us to take a code path that's hard to 
trigger otherwise.  When a single client writes to a file, we can do 
buffered IO.  Even with O_SYNC/D_SYNC this just causes a flush after every 
write.  When multiple clients open a file for read/write, though, ceph 
bypasses the page cache and does synchronous IO to the server.  It's 
similar to the O_DIRECT path, but not quite, and doesn't get good test 
coverage without an easy way to use it.  

A ceph ioctl sets the CEPH_F_SYNC flag in the file private struct.  It's 
similar to the CEPH_F_LAZYIO ioctl, but with opposite results; that one 
avoids sync io despite multi-client write sharing (for applications who 
know what they're doing).

sage

--
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