<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/sync.c, branch v2.6.19</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/sync.c?h=v2.6.19</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/sync.c?h=v2.6.19'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2006-09-30T18:31:19Z</updated>
<entry>
<title>[PATCH] BLOCK: Move functions out of buffer code [try #6]</title>
<updated>2006-09-30T18:31:19Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2006-08-29T18:05:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cf9a2ae8d49948f861b56e5333530e491a9da190'/>
<id>urn:sha1:cf9a2ae8d49948f861b56e5333530e491a9da190</id>
<content type='text'>
Move some functions out of the buffering code that aren't strictly buffering
specific.  This is a precursor to being able to disable the block layer.

 (*) Moved some stuff out of fs/buffer.c:

     (*) The file sync and general sync stuff moved to fs/sync.c.

     (*) The superblock sync stuff moved to fs/super.c.

     (*) do_invalidatepage() moved to mm/truncate.c.

     (*) try_to_release_page() moved to mm/filemap.c.

 (*) Moved some related declarations between header files:

     (*) declarations for do_invalidatepage() and try_to_release_page() moved
     	 to linux/mm.h.

     (*) __set_page_dirty_buffers() moved to linux/buffer_head.h.

Signed-Off-By: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>[PATCH] writeback: fix range handling</title>
<updated>2006-06-23T14:42:49Z</updated>
<author>
<name>OGAWA Hirofumi</name>
<email>hirofumi@mail.parknet.co.jp</email>
</author>
<published>2006-06-23T09:03:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=111ebb6e6f7bd7de6d722c5848e95621f43700d9'/>
<id>urn:sha1:111ebb6e6f7bd7de6d722c5848e95621f43700d9</id>
<content type='text'>
When a writeback_control's `start' and `end' fields are used to
indicate a one-byte-range starting at file offset zero, the required
values of .start=0,.end=0 mean that the -&gt;writepages() implementation
has no way of telling that it is being asked to perform a range
request.  Because we're currently overloading (start == 0 &amp;&amp; end == 0)
to mean "this is not a write-a-range request".

To make all this sane, the patch changes range of writeback_control.

So caller does: If it is calling -&gt;writepages() to write pages, it
sets range (range_start/end or range_cyclic) always.

And if range_cyclic is true, -&gt;writepages() thinks the range is
cyclic, otherwise it just uses range_start and range_end.

This patch does,

    - Add LLONG_MAX, LLONG_MIN, ULLONG_MAX to include/linux/kernel.h
      -1 is usually ok for range_end (type is long long). But, if someone did,

		range_end += val;		range_end is "val - 1"
		u64val = range_end &gt;&gt; bits;	u64val is "~(0ULL)"

      or something, they are wrong. So, this adds LLONG_MAX to avoid nasty
      things, and uses LLONG_MAX for range_end.

    - All callers of -&gt;writepages() sets range_start/end or range_cyclic.

    - Fix updates of -&gt;writeback_index. It seems already bit strange.
      If it starts at 0 and ended by check of nr_to_write, this last
      index may reduce chance to scan end of file.  So, this updates
      -&gt;writeback_index only if range_cyclic is true or whole-file is
      scanned.

Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Cc: Nathan Scott &lt;nathans@sgi.com&gt;
Cc: Anton Altaparmakov &lt;aia21@cantab.net&gt;
Cc: Steven French &lt;sfrench@us.ibm.com&gt;
Cc: "Vladimir V. Saveliev" &lt;vs@namesys.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] sync_file_range(): use unsigned for flags</title>
<updated>2006-04-11T13:18:40Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2006-04-11T05:53:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5246d0503130fa58904c8beb987fcf93b96d8ab6'/>
<id>urn:sha1:5246d0503130fa58904c8beb987fcf93b96d8ab6</id>
<content type='text'>
Ulrich suggested that the `flags' arg to sync_file_range() become unsigned.

Cc: Ulrich Drepper &lt;drepper@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] sys_sync_file_range()</title>
<updated>2006-03-31T20:18:54Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2006-03-31T10:30:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f79e2abb9bd452d97295f34376dedbec9686b986'/>
<id>urn:sha1:f79e2abb9bd452d97295f34376dedbec9686b986</id>
<content type='text'>
Remove the recently-added LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT
fadvise() additions, do it in a new sys_sync_file_range() syscall instead.
Reasons:

- It's more flexible.  Things which would require two or three syscalls with
  fadvise() can be done in a single syscall.

- Using fadvise() in this manner is something not covered by POSIX.

The patch wires up the syscall for x86.

The sycall is implemented in the new fs/sync.c.  The intention is that we can
move sys_fsync(), sys_fdatasync() and perhaps sys_sync() into there later.

Documentation for the syscall is in fs/sync.c.

A test app (sync_file_range.c) is in
http://www.zip.com.au/~akpm/linux/patches/stuff/ext3-tools.tar.gz.

The available-to-GPL-modules do_sync_file_range() is for knfsd: "A COMMIT can
say NFS_DATA_SYNC or NFS_FILE_SYNC.  I can skip the -&gt;fsync call for
NFS_DATA_SYNC which is hopefully the more common."

Note: the `async' writeout mode SYNC_FILE_RANGE_WRITE will turn synchronous if
the queue is congested.  This is trivial to fix: add a new flag bit, set
wbc-&gt;nonblocking.  But I'm not sure that we want to expose implementation
details down to that level.

Note: it's notable that we can sync an fd which wasn't opened for writing.
Same with fsync() and fdatasync()).

Note: the code takes some care to handle attempts to sync file contents
outside the 16TB offset on 32-bit machines.  It makes such attempts appear to
succeed, for best 32-bit/64-bit compatibility.  Perhaps it should make such
requests fail...

Cc: Nick Piggin &lt;nickpiggin@yahoo.com.au&gt;
Cc: Michael Kerrisk &lt;mtk-manpages@gmx.net&gt;
Cc: Ulrich Drepper &lt;drepper@redhat.com&gt;
Cc: Neil Brown &lt;neilb@cse.unsw.edu.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
