<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/ocfs2/extent_map.h, branch v4.4.38</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: Implement llseek()</title>
<updated>2011-07-25T21:58:15+00:00</updated>
<author>
<name>Sunil Mushran</name>
<email>sunil.mushran@oracle.com</email>
</author>
<published>2011-07-25T21:58:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=93862d5e1ab875664c6cc95254fc365028a48bb1'/>
<id>93862d5e1ab875664c6cc95254fc365028a48bb1</id>
<content type='text'>
ocfs2 implements its own llseek() to provide the SEEK_HOLE/SEEK_DATA
functionality.

SEEK_HOLE sets the file pointer to the start of either a hole or an unwritten
(preallocated) extent, that is greater than or equal to the supplied offset.

SEEK_DATA sets the file pointer to the start of an allocated extent (not
unwritten) that is greater than or equal to the supplied offset.

If the supplied offset is on a desired region, then the file pointer is set
to it. Offsets greater than or equal to the file size return -ENXIO.

Unwritten (preallocated) extents are considered holes because the file system
treats reads to such regions in the same way as it does to holes.

Signed-off-by: Sunil Mushran &lt;sunil.mushran@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ocfs2 implements its own llseek() to provide the SEEK_HOLE/SEEK_DATA
functionality.

SEEK_HOLE sets the file pointer to the start of either a hole or an unwritten
(preallocated) extent, that is greater than or equal to the supplied offset.

SEEK_DATA sets the file pointer to the start of an allocated extent (not
unwritten) that is greater than or equal to the supplied offset.

If the supplied offset is on a desired region, then the file pointer is set
to it. Offsets greater than or equal to the file size return -ENXIO.

Unwritten (preallocated) extents are considered holes because the file system
treats reads to such regions in the same way as it does to holes.

Signed-off-by: Sunil Mushran &lt;sunil.mushran@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ocfs2: Return extent flags for xattr value tree.</title>
<updated>2009-09-23T03:09:39+00:00</updated>
<author>
<name>Tao Ma</name>
<email>tao.ma@oracle.com</email>
</author>
<published>2009-08-18T03:41:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1061f9c1c9f81ed88b5d268a95d8e3ace80da63a'/>
<id>1061f9c1c9f81ed88b5d268a95d8e3ace80da63a</id>
<content type='text'>
With the new refcount tree, xattr value can also be refcounted
among multiple files. So return the appropriate extent flags
so that CoW can used it later.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the new refcount tree, xattr value can also be refcounted
among multiple files. So return the appropriate extent flags
so that CoW can used it later.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ocfs2: Add support for incrementing refcount in the tree.</title>
<updated>2009-09-23T03:09:33+00:00</updated>
<author>
<name>Tao Ma</name>
<email>tao.ma@oracle.com</email>
</author>
<published>2009-08-11T06:33:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e73a819db9c2d6c4065b7cab7374709b6939e8f1'/>
<id>e73a819db9c2d6c4065b7cab7374709b6939e8f1</id>
<content type='text'>
    Given a physical cpos and length, increment the refcount
in the tree. If the extent has not been seen before, a refcount
record is created for it. Refcount records may be merged or
split by this operation.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    Given a physical cpos and length, increment the refcount
in the tree. If the extent has not been seen before, a refcount
record is created for it. Refcount records may be merged or
split by this operation.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ocfs2: Wrap virtual block reads in ocfs2_read_virt_blocks()</title>
<updated>2009-01-05T16:36:54+00:00</updated>
<author>
<name>Joel Becker</name>
<email>joel.becker@oracle.com</email>
</author>
<published>2008-11-13T22:49:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a8549fb5abb2b372e46d5de0d23ff8b24f4a61af'/>
<id>a8549fb5abb2b372e46d5de0d23ff8b24f4a61af</id>
<content type='text'>
The ocfs2_read_dir_block() function really maps an inode's virtual
blocks to physical ones before calling ocfs2_read_blocks().  Let's
extract that to common code, because other places might want to do that.

Other than the block number being virtual, ocfs2_read_virt_blocks()
takes the same arguments as ocfs2_read_blocks().  It converts those
virtual block numbers to physical before calling ocfs2_read_blocks()
directly.  If the blocks asked for are discontiguous, this can mean
multiple calls to ocfs2_read_blocks(), but this is mostly hidden from
the caller.

Like ocfs2_read_blocks(), the caller can pass in an existing
buffer_head.  This is usually done to pick up some readahead I/O.
ocfs2_read_virt_blocks() checks the buffer_head's block number
against the extent map - it must match.

Signed-off-by: Joel Becker &lt;joel.becker@oracle.com&gt;
Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ocfs2_read_dir_block() function really maps an inode's virtual
blocks to physical ones before calling ocfs2_read_blocks().  Let's
extract that to common code, because other places might want to do that.

Other than the block number being virtual, ocfs2_read_virt_blocks()
takes the same arguments as ocfs2_read_blocks().  It converts those
virtual block numbers to physical before calling ocfs2_read_blocks()
directly.  If the blocks asked for are discontiguous, this can mean
multiple calls to ocfs2_read_blocks(), but this is mostly hidden from
the caller.

Like ocfs2_read_blocks(), the caller can pass in an existing
buffer_head.  This is usually done to pick up some readahead I/O.
ocfs2_read_virt_blocks() checks the buffer_head's block number
against the extent map - it must match.

Signed-off-by: Joel Becker &lt;joel.becker@oracle.com&gt;
Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ocfs2: Add extent tree operation for xattr value btrees</title>
<updated>2008-10-13T23:57:01+00:00</updated>
<author>
<name>Tao Ma</name>
<email>tao.ma@oracle.com</email>
</author>
<published>2008-08-18T09:38:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f56654c435c06f2b2bd5751889b1a08a3add7d6c'/>
<id>f56654c435c06f2b2bd5751889b1a08a3add7d6c</id>
<content type='text'>
Add some thin wrappers around ocfs2_insert_extent() for each of the 3
different btree types, ocfs2_inode_insert_extent(),
ocfs2_xattr_value_insert_extent() and ocfs2_xattr_tree_insert_extent(). The
last is for the xattr index btree, which will be used in a followup patch.

All the old callers in file.c etc will call ocfs2_dinode_insert_extent(),
while the other two handle the xattr issue. And the init of extent tree are
handled by these functions.

When storing xattr value which is too large, we will allocate some clusters
for it and here ocfs2_extent_list and ocfs2_extent_rec will also be used. In
order to re-use the b-tree operation code, a new parameter named "private"
is added into ocfs2_extent_tree and it is used to indicate the root of
ocfs2_exent_list. The reason is that we can't deduce the root from the
buffer_head now. It may be in an inode, an ocfs2_xattr_block or even worse,
in any place in an ocfs2_xattr_bucket.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add some thin wrappers around ocfs2_insert_extent() for each of the 3
different btree types, ocfs2_inode_insert_extent(),
ocfs2_xattr_value_insert_extent() and ocfs2_xattr_tree_insert_extent(). The
last is for the xattr index btree, which will be used in a followup patch.

All the old callers in file.c etc will call ocfs2_dinode_insert_extent(),
while the other two handle the xattr issue. And the init of extent tree are
handled by these functions.

When storing xattr value which is too large, we will allocate some clusters
for it and here ocfs2_extent_list and ocfs2_extent_rec will also be used. In
order to re-use the b-tree operation code, a new parameter named "private"
is added into ocfs2_extent_tree and it is used to indicate the root of
ocfs2_exent_list. The reason is that we can't deduce the root from the
buffer_head now. It may be in an inode, an ocfs2_xattr_block or even worse,
in any place in an ocfs2_xattr_bucket.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ocfs2: fiemap support</title>
<updated>2008-10-03T21:32:11+00:00</updated>
<author>
<name>Mark Fasheh</name>
<email>mfasheh@suse.com</email>
</author>
<published>2008-10-03T21:32:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=00dc417fa3e763345b34ccb6034d72de76eea0a1'/>
<id>00dc417fa3e763345b34ccb6034d72de76eea0a1</id>
<content type='text'>
Plug ocfs2 into -&gt;fiemap. Some portions of ocfs2_get_clusters() had to be
refactored so that the extent cache can be skipped in favor of going
directly to the on-disk records. This makes it easier for us to determine
which extent is the last one in the btree. Also, I'm not sure we want to be
caching fiemap lookups anyway as they're not directly related to data
read/write.

Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: ocfs2-devel@oss.oracle.com
Cc: linux-fsdevel@vger.kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Plug ocfs2 into -&gt;fiemap. Some portions of ocfs2_get_clusters() had to be
refactored so that the extent cache can be skipped in favor of going
directly to the on-disk records. This makes it easier for us to determine
which extent is the last one in the btree. Also, I'm not sure we want to be
caching fiemap lookups anyway as they're not directly related to data
read/write.

Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: ocfs2-devel@oss.oracle.com
Cc: linux-fsdevel@vger.kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>ocfs2: Cache extent records</title>
<updated>2007-04-26T22:10:40+00:00</updated>
<author>
<name>Mark Fasheh</name>
<email>mark.fasheh@oracle.com</email>
</author>
<published>2007-04-24T01:53:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=83418978827324918a8cd25ce5227312de1d4468'/>
<id>83418978827324918a8cd25ce5227312de1d4468</id>
<content type='text'>
The extent map code was ripped out earlier because of an inability to deal
with holes. This patch adds back a simpler caching scheme requiring far less
code.

Our old extent map caching was designed back when meta data block caching in
Ocfs2 didn't work very well, resulting in many disk reads. These days our
metadata caching is much better, resulting in no un-necessary disk reads. As
a result, extent caching doesn't have to be as fancy, nor does it have to
cache as many extents. Keeping the last 3 extents seen should be sufficient
to give us a small performance boost on some streaming workloads.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The extent map code was ripped out earlier because of an inability to deal
with holes. This patch adds back a simpler caching scheme requiring far less
code.

Our old extent map caching was designed back when meta data block caching in
Ocfs2 didn't work very well, resulting in many disk reads. These days our
metadata caching is much better, resulting in no un-necessary disk reads. As
a result, extent caching doesn't have to be as fancy, nor does it have to
cache as many extents. Keeping the last 3 extents seen should be sufficient
to give us a small performance boost on some streaming workloads.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ocfs2: Fix extent lookup to return true size of holes</title>
<updated>2007-04-26T22:02:45+00:00</updated>
<author>
<name>Mark Fasheh</name>
<email>mark.fasheh@oracle.com</email>
</author>
<published>2007-03-10T00:26:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4f902c37727bbedbc0508a1477874c58ddcc9af8'/>
<id>4f902c37727bbedbc0508a1477874c58ddcc9af8</id>
<content type='text'>
Initially, we had wired things to return a size '1' of holes. Cook up a
small amount of code to find the next extent and calculate the number of
clusters between the virtual offset and the next allocated extent.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Initially, we had wired things to return a size '1' of holes. Cook up a
small amount of code to find the next extent and calculate the number of
clusters between the virtual offset and the next allocated extent.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ocfs2: Read from an unwritten extent returns zeros</title>
<updated>2007-04-26T22:02:41+00:00</updated>
<author>
<name>Mark Fasheh</name>
<email>mark.fasheh@oracle.com</email>
</author>
<published>2007-03-10T00:21:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=49cb8d2d496ce06869ccca2ab368ed6b0b5b979d'/>
<id>49cb8d2d496ce06869ccca2ab368ed6b0b5b979d</id>
<content type='text'>
Return an optional extent flags field from our lookup functions and wire up
callers to treat unwritten regions as holes for the purpose of returning
zeros to the user.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Return an optional extent flags field from our lookup functions and wire up
callers to treat unwritten regions as holes for the purpose of returning
zeros to the user.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ocfs2: teach ocfs2_file_aio_write() about sparse files</title>
<updated>2007-04-26T22:02:08+00:00</updated>
<author>
<name>Mark Fasheh</name>
<email>mark.fasheh@oracle.com</email>
</author>
<published>2007-02-10T04:24:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9517bac6cc7a7aa4fee63cb38a32cb6014e264c7'/>
<id>9517bac6cc7a7aa4fee63cb38a32cb6014e264c7</id>
<content type='text'>
Unfortunately, ocfs2 can no longer make use of generic_file_aio_write_nlock()
because allocating writes will require zeroing of pages adjacent to the I/O
for cluster sizes greater than page size.

Implement a custom file write here, which can order page locks for zeroing.
This also has the advantage that cluster locks can easily be ordered outside
of the page locks.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unfortunately, ocfs2 can no longer make use of generic_file_aio_write_nlock()
because allocating writes will require zeroing of pages adjacent to the I/O
for cluster sizes greater than page size.

Implement a custom file write here, which can order page locks for zeroing.
This also has the advantage that cluster locks can easily be ordered outside
of the page locks.

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