<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/ocfs2/aops.h, branch v3.4.54</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>ocfs2: serialize unaligned aio</title>
<updated>2011-07-28T09:07:16+00:00</updated>
<author>
<name>Mark Fasheh</name>
<email>mfasheh@suse.com</email>
</author>
<published>2011-06-22T21:23:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a11f7e63c59810a81494d4c4b028af707d4c7ca4'/>
<id>a11f7e63c59810a81494d4c4b028af707d4c7ca4</id>
<content type='text'>
Fix a corruption that can happen when we have (two or more) outstanding
aio's to an overlapping unaligned region.  Ext4
(e9e3bcecf44c04b9e6b505fd8e2eb9cea58fb94d) and xfs recently had to fix
similar issues.

In our case what happens is that we can have an outstanding aio on a region
and if a write comes in with some bytes overlapping the original aio we may
decide to read that region into a page before continuing (typically because
of buffered-io fallback).  Since we have no ordering guarantees with the
aio, we can read stale or bad data into the page and then write it back out.

If the i/o is page and block aligned, then we avoid this issue as there
won't be any need to read data from disk.

I took the same approach as Eric in the ext4 patch and introduced some
serialization of unaligned async direct i/o.  I don't expect this to have an
effect on the most common cases of AIO.  Unaligned aio will be slower
though, but that's far more acceptable than data corruption.

Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
Signed-off-by: Joel Becker &lt;jlbec@evilplan.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix a corruption that can happen when we have (two or more) outstanding
aio's to an overlapping unaligned region.  Ext4
(e9e3bcecf44c04b9e6b505fd8e2eb9cea58fb94d) and xfs recently had to fix
similar issues.

In our case what happens is that we can have an outstanding aio on a region
and if a write comes in with some bytes overlapping the original aio we may
decide to read that region into a page before continuing (typically because
of buffered-io fallback).  Since we have no ordering guarantees with the
aio, we can read stale or bad data into the page and then write it back out.

If the i/o is page and block aligned, then we avoid this issue as there
won't be any need to read data from disk.

I took the same approach as Eric in the ext4 patch and introduced some
serialization of unaligned async direct i/o.  I don't expect this to have an
effect on the most common cases of AIO.  Unaligned aio will be slower
though, but that's far more acceptable than data corruption.

Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
Signed-off-by: Joel Becker &lt;jlbec@evilplan.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix common misspellings</title>
<updated>2011-03-31T14:26:23+00:00</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-03-31T01:57:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Ocfs2: Teach 'coherency=full' O_DIRECT writes to correctly up_read i_alloc_sem.</title>
<updated>2010-12-09T23:36:48+00:00</updated>
<author>
<name>Tristan Ye</name>
<email>tristan.ye@oracle.com</email>
</author>
<published>2010-12-07T06:35:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=39c99f12f15c8bf8257985d9b2a2548a03d18c00'/>
<id>39c99f12f15c8bf8257985d9b2a2548a03d18c00</id>
<content type='text'>
Due to newly-introduced 'coherency=full' O_DIRECT writes also takes the EX
rw_lock like buffered writes did(rw_level == 1), it turns out messing the
usage of 'level' in ocfs2_dio_end_io() up, which caused i_alloc_sem being
failed to get up_read'd correctly.

This patch tries to teach ocfs2_dio_end_io to understand well on all locking
stuffs by explicitly introducing a new bit for i_alloc_sem in iocb's private
data, just like what we did for rw_lock.

Signed-off-by: Tristan Ye &lt;tristan.ye@oracle.com&gt;
Signed-off-by: Joel Becker &lt;joel.becker@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Due to newly-introduced 'coherency=full' O_DIRECT writes also takes the EX
rw_lock like buffered writes did(rw_level == 1), it turns out messing the
usage of 'level' in ocfs2_dio_end_io() up, which caused i_alloc_sem being
failed to get up_read'd correctly.

This patch tries to teach ocfs2_dio_end_io to understand well on all locking
stuffs by explicitly introducing a new bit for i_alloc_sem in iocb's private
data, just like what we did for rw_lock.

Signed-off-by: Tristan Ye &lt;tristan.ye@oracle.com&gt;
Signed-off-by: Joel Becker &lt;joel.becker@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: kill block_prepare_write</title>
<updated>2010-10-26T01:18:20+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2010-10-06T08:47:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ebdec241d509cf69f6ebf1ecdc036359d3dbe154'/>
<id>ebdec241d509cf69f6ebf1ecdc036359d3dbe154</id>
<content type='text'>
__block_write_begin and block_prepare_write are identical except for slightly
different calling conventions.  Convert all callers to the __block_write_begin
calling conventions and drop block_prepare_write.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__block_write_begin and block_prepare_write are identical except for slightly
different calling conventions.  Convert all callers to the __block_write_begin
calling conventions and drop block_prepare_write.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ocfs2: pass struct file* to ocfs2_write_begin_nolock.</title>
<updated>2010-08-12T02:39:48+00:00</updated>
<author>
<name>Tao Ma</name>
<email>tao.ma@oracle.com</email>
</author>
<published>2010-08-12T02:25:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0378da0fda6edf5aaffda6f1248a78986bd955b5'/>
<id>0378da0fda6edf5aaffda6f1248a78986bd955b5</id>
<content type='text'>
struct file * has file_ra_state to store the readahead state
and data. So pass this to ocfs2_write_begin_nolock so that
it can be used in ocfs2_refcount_cow.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
struct file * has file_ra_state to store the readahead state
and data. So pass this to ocfs2_write_begin_nolock so that
it can be used in ocfs2_refcount_cow.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ocfs2: Add CoW support.</title>
<updated>2009-09-23T03:09:36+00:00</updated>
<author>
<name>Tao Ma</name>
<email>tao.ma@oracle.com</email>
</author>
<published>2009-08-25T00:05:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6f70fa519976a379d72781d927cf8e5f5b05ec86'/>
<id>6f70fa519976a379d72781d927cf8e5f5b05ec86</id>
<content type='text'>
This patch try CoW support for a refcounted record.

the whole process will be:
1. Calculate how many clusters we need to CoW and where we start.
   Extents that are not completely encompassed by the write will
   be broken on 1MB boundaries.
2. Do CoW for the clusters with the help of page cache.
3. Change the b-tree structure with the new allocated clusters.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch try CoW support for a refcounted record.

the whole process will be:
1. Calculate how many clusters we need to CoW and where we start.
   Extents that are not completely encompassed by the write will
   be broken on 1MB boundaries.
2. Do CoW for the clusters with the help of page cache.
3. Change the b-tree structure with the new allocated clusters.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ocfs2: convert to new aops</title>
<updated>2007-10-16T16:42:58+00:00</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2007-10-16T08:25:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b6af1bcd8720cb3062c8c4d4c8ba02bee10ff03f'/>
<id>b6af1bcd8720cb3062c8c4d4c8ba02bee10ff03f</id>
<content type='text'>
Plug ocfs2 into the -&gt;write_begin and -&gt;write_end aops.

A bunch of custom code is now gone - the iovec iteration stuff during write
and the ocfs2 splice write actor.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Plug ocfs2 into the -&gt;write_begin and -&gt;write_end aops.

A bunch of custom code is now gone - the iovec iteration stuff during write
and the ocfs2 splice write actor.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ocfs2: Write support for inline data</title>
<updated>2007-10-12T18:54:40+00:00</updated>
<author>
<name>Mark Fasheh</name>
<email>mark.fasheh@oracle.com</email>
</author>
<published>2007-09-07T21:46:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1afc32b952335f665327a1a9001ba1b44bb76fd9'/>
<id>1afc32b952335f665327a1a9001ba1b44bb76fd9</id>
<content type='text'>
This fixes up write, truncate, mmap, and RESVSP/UNRESVP to understand inline
inode data.

For the most part, the changes to the core write code can be relied on to do
the heavy lifting. Any code calling ocfs2_write_begin (including shared
writeable mmap) can count on it doing the right thing with respect to
growing inline data to an extent tree.

Size reducing truncates, including UNRESVP can simply zero that portion of
the inode block being removed. Size increasing truncatesm, including RESVP
have to be a little bit smarter and grow the inode to an extent tree if
necessary.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
Reviewed-by: Joel Becker &lt;joel.becker@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes up write, truncate, mmap, and RESVSP/UNRESVP to understand inline
inode data.

For the most part, the changes to the core write code can be relied on to do
the heavy lifting. Any code calling ocfs2_write_begin (including shared
writeable mmap) can count on it doing the right thing with respect to
growing inline data to an extent tree.

Size reducing truncates, including UNRESVP can simply zero that portion of
the inode block being removed. Size increasing truncatesm, including RESVP
have to be a little bit smarter and grow the inode to an extent tree if
necessary.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
Reviewed-by: Joel Becker &lt;joel.becker@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ocfs2: Small refactor of truncate zeroing code</title>
<updated>2007-10-12T18:54:35+00:00</updated>
<author>
<name>Mark Fasheh</name>
<email>mark.fasheh@oracle.com</email>
</author>
<published>2007-09-07T21:20:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1d410a6e337a0d2d5543ad1d9bccb670a7a05312'/>
<id>1d410a6e337a0d2d5543ad1d9bccb670a7a05312</id>
<content type='text'>
We'll want to reuse most of this when pushing inline data back out to an
extent. Keeping this part as a seperate patch helps to keep the upcoming
changes for write support uncluttered.

The core portion of ocfs2_zero_cluster_pages() responsible for making sure a
page is mapped and properly dirtied is abstracted out into it's own
function, ocfs2_map_and_dirty_page(). Actual functionality doesn't change,
though zeroing becomes optional.

We also turn part of ocfs2_free_write_ctxt() into  a common function for
unlocking and freeing a page array. This operation is very common (and
uniform) for Ocfs2 cluster sizes greater than page size, so it makes sense
to keep the code in one place.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
Reviewed-by: Joel Becker &lt;joel.becker@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We'll want to reuse most of this when pushing inline data back out to an
extent. Keeping this part as a seperate patch helps to keep the upcoming
changes for write support uncluttered.

The core portion of ocfs2_zero_cluster_pages() responsible for making sure a
page is mapped and properly dirtied is abstracted out into it's own
function, ocfs2_map_and_dirty_page(). Actual functionality doesn't change,
though zeroing becomes optional.

We also turn part of ocfs2_free_write_ctxt() into  a common function for
unlocking and freeing a page array. This operation is very common (and
uniform) for Ocfs2 cluster sizes greater than page size, so it makes sense
to keep the code in one place.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
Reviewed-by: Joel Becker &lt;joel.becker@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ocfs2: shared writeable mmap</title>
<updated>2007-07-11T00:31:51+00:00</updated>
<author>
<name>Mark Fasheh</name>
<email>mark.fasheh@oracle.com</email>
</author>
<published>2007-05-09T22:16:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7307de80510a70e5e5aa98de1e80ccbb7d90a3a8'/>
<id>7307de80510a70e5e5aa98de1e80ccbb7d90a3a8</id>
<content type='text'>
Implement cluster consistent shared writeable mappings using the
-&gt;page_mkwrite() callback.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement cluster consistent shared writeable mappings using the
-&gt;page_mkwrite() callback.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
