Revision tags: v2.6.23-rc6 |
|
#
1afc32b9 |
| 07-Sep-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: Write support for inline data
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
ocfs2: Write support for inline data
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 <mark.fasheh@oracle.com> Reviewed-by: Joel Becker <joel.becker@oracle.com>
show more ...
|
#
1d410a6e |
| 07-Sep-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: Small refactor of truncate zeroing code
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 chang
ocfs2: Small refactor of truncate zeroing code
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 <mark.fasheh@oracle.com> Reviewed-by: Joel Becker <joel.becker@oracle.com>
show more ...
|
#
015452b1 |
| 12-Sep-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: Remove unused structure field
c_used_tail_recs in struct ocfs2_merge_ctxt is only ever set, so we can remove it.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
|
Revision tags: v2.6.23-rc5 |
|
#
518d7269 |
| 28-Aug-2007 |
Tao Mao <tao.ma@oracle.com> |
ocfs2: remove unused variable
delete_tail_recs in ocfs2_try_to_merge_extent() was only ever set, remove it.
Signed-off-by: Tao Mao <tao.ma@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle
ocfs2: remove unused variable
delete_tail_recs in ocfs2_try_to_merge_extent() was only ever set, remove it.
Signed-off-by: Tao Mao <tao.ma@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
#
c77534f6 |
| 28-Aug-2007 |
Tao Mao <tao.ma@oracle.com> |
ocfs2: remove mostly unused field from insert structure
ocfs2_insert_type->ins_free_records was only used in one place, and was set incorrectly in most places. We can free up some memory and lose so
ocfs2: remove mostly unused field from insert structure
ocfs2_insert_type->ins_free_records was only used in one place, and was set incorrectly in most places. We can free up some memory and lose some code by removing this.
* Small warning fixup contributed by Andrew Mortom <akpm@linux-foundation.org>
Signed-off-by: Tao Mao <tao.ma@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
#
e535e2ef |
| 31-Aug-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: Fix calculation of i_blocks during truncate
We were setting i_blocks too early - before truncating any allocation. Correct things to set i_blocks after the allocation change.
Signed-off-by:
ocfs2: Fix calculation of i_blocks during truncate
We were setting i_blocks too early - before truncating any allocation. Correct things to set i_blocks after the allocation change.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
Revision tags: v2.6.23-rc4, v2.6.23-rc3, v2.6.23-rc2 |
|
#
6a18380e |
| 23-Jul-2007 |
Adrian Bunk <bunk@stusta.de> |
[2.6 patch] ocfs2_insert_extent(): remove dead code
This patch removes some now dead code.
Spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mark Fasheh <
[2.6 patch] ocfs2_insert_extent(): remove dead code
This patch removes some now dead code.
Spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
Revision tags: v2.6.23-rc1, v2.6.22 |
|
#
063c4561 |
| 03-Jul-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: support for removing file regions
Provide an internal interface for the removal of arbitrary file regions.
ocfs2_remove_inode_range() takes a byte range within a file and will remove existin
ocfs2: support for removing file regions
Provide an internal interface for the removal of arbitrary file regions.
ocfs2_remove_inode_range() takes a byte range within a file and will remove existing extents within that range. Partial clusters will be zeroed so that any read from within the region will return zeros.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
#
35edec1d |
| 06-Jul-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: update truncate handling of partial clusters
The partial cluster zeroing code used during truncate usually assumes that the rightmost byte in the range to be zeroed lies on a cluster boundary
ocfs2: update truncate handling of partial clusters
The partial cluster zeroing code used during truncate usually assumes that the rightmost byte in the range to be zeroed lies on a cluster boundary. This makes sense for truncate, but punching holes might require zeroing on non-aligned rightmost boundaries.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
#
d0c7d708 |
| 03-Jul-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: btree support for removal of arbirtrary extents
Add code to the btree paths to support the removal of arbitrary regions within an existing extent. With proper higher level support this can be
ocfs2: btree support for removal of arbirtrary extents
Add code to the btree paths to support the removal of arbitrary regions within an existing extent. With proper higher level support this can be used to "punch holes" in a file. Truncate (a special case of hole punching) could also be converted to use these methods.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
Revision tags: v2.6.22-rc7, v2.6.22-rc6, v2.6.22-rc5, v2.6.22-rc4, v2.6.22-rc3, v2.6.22-rc2, v2.6.22-rc1, v2.6.21, v2.6.21-rc7, v2.6.21-rc6, v2.6.21-rc5, v2.6.21-rc4 |
|
#
2ae99a60 |
| 09-Mar-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: Support creation of unwritten extents
This can now be trivially supported with re-use of our existing extend code.
ocfs2_allocate_unwritten_extents() takes a start offset and a byte length a
ocfs2: Support creation of unwritten extents
This can now be trivially supported with re-use of our existing extend code.
ocfs2_allocate_unwritten_extents() takes a start offset and a byte length and iterates over the inode, adding extents (marked as unwritten) until len is reached. Existing extents are skipped over.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
#
328d5752 |
| 18-Jun-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: btree changes for unwritten extents
Writes to a region marked as unwritten might result in a record split or merge. We can support splits by making minor changes to the existing insert code.
ocfs2: btree changes for unwritten extents
Writes to a region marked as unwritten might result in a record split or merge. We can support splits by making minor changes to the existing insert code. Merges require left rotations which mostly re-use right rotation support functions.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
#
c3afcbb3 |
| 29-May-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: abstract btree growing calls
The top level calls and logic for growing a tree can easily be abstracted out of ocfs2_insert_extent() into a seperate function - ocfs2_grow_tree().
This allows
ocfs2: abstract btree growing calls
The top level calls and logic for growing a tree can easily be abstracted out of ocfs2_insert_extent() into a seperate function - ocfs2_grow_tree().
This allows future code to easily grow btrees when needed.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
#
1f6697d0 |
| 25-Jun-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: use all extent block suballocators
Now that we have a method to deallocate blocks from them, each node should allocate extent blocks from their local suballocator file.
Signed-off-by: Mark F
ocfs2: use all extent block suballocators
Now that we have a method to deallocate blocks from them, each node should allocate extent blocks from their local suballocator file.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
#
59a5e416 |
| 22-Jun-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: plug truncate into cached dealloc routines
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
|
#
2b604351 |
| 22-Jun-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: simplify deallocation locking
Deallocation of suballocator blocks, most notably extent blocks, might involve multiple suballocator inodes.
The locking for this can get extremely complicated,
ocfs2: simplify deallocation locking
Deallocation of suballocator blocks, most notably extent blocks, might involve multiple suballocator inodes.
The locking for this can get extremely complicated, especially when the suballocator inodes to delete from aren't known until deep within an unrelated codepath.
Implement a simple scheme for recording the blocks to be unlinked so that the actual deallocation can be done in a context which won't deadlock.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
#
2e89b2e4 |
| 09-May-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: take ip_alloc_sem during entire truncate
Use of the alloc sem during truncate was too narrow - we want to protect the i_size change and page truncation against mmap now.
Signed-off-by: Mark
ocfs2: take ip_alloc_sem during entire truncate
Use of the alloc sem during truncate was too narrow - we want to protect the i_size change and page truncation against mmap now.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
#
1ca1a111 |
| 27-Apr-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: fix sparse warnings in fs/ocfs2
None of these are actually harmful, but the noise makes looking for real problems difficult.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
|
#
83418978 |
| 23-Apr-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: Cache extent records
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 ext
ocfs2: Cache extent records
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 <mark.fasheh@oracle.com>
show more ...
|
#
49cb8d2d |
| 09-Mar-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: Read from an unwritten extent returns zeros
Return an optional extent flags field from our lookup functions and wire up callers to treat unwritten regions as holes for the purpose of returnin
ocfs2: Read from an unwritten extent returns zeros
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 <mark.fasheh@oracle.com>
show more ...
|
#
e48edee2 |
| 07-Mar-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: make room for unwritten extents flag
Due to the size of our group bitmaps, we'll never have a leaf node extent record with more than 16 bits worth of clusters. Split e_clusters up so that lea
ocfs2: make room for unwritten extents flag
Due to the size of our group bitmaps, we'll never have a leaf node extent record with more than 16 bits worth of clusters. Split e_clusters up so that leaf nodes can get a flags field where we can mark unwritten extents. Interior nodes whose length references all the child nodes beneath it can't split their e_clusters field, so we use a union to preserve sizing there.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
Revision tags: v2.6.21-rc3 |
|
#
fa41045f |
| 01-Mar-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: Use do_sync_mapping_range() in ocfs2_zero_tail_for_truncate()
Do this instead of filemap_fdatawrite() - this way we sync only the range between i_size and the cluster boundary.
Signed-off-by
ocfs2: Use do_sync_mapping_range() in ocfs2_zero_tail_for_truncate()
Do this instead of filemap_fdatawrite() - this way we sync only the range between i_size and the cluster boundary.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
Revision tags: v2.6.21-rc2, v2.6.21-rc1 |
|
#
60b11392 |
| 16-Feb-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: zero tail of sparse files on truncate
Since we don't zero on extend anymore, truncate needs to be fixed up to zero the part of a file between i_size and and end of it's cluster. Otherwise a s
ocfs2: zero tail of sparse files on truncate
Since we don't zero on extend anymore, truncate needs to be fixed up to zero the part of a file between i_size and and end of it's cluster. Otherwise a subsequent extend could expose bad data.
This introduced a new helper, which can be used in ocfs2_write().
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
Revision tags: v2.6.20, v2.6.20-rc7, v2.6.20-rc6 |
|
#
3a0782d0 |
| 17-Jan-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: teach extend/truncate about sparse files
For ocfs2_truncate_file(), we eliminate the "simple" truncate case which no longer exists since i_size is not tied to i_clusters. In ocfs2_extend_file
ocfs2: teach extend/truncate about sparse files
For ocfs2_truncate_file(), we eliminate the "simple" truncate case which no longer exists since i_size is not tied to i_clusters. In ocfs2_extend_file(), we skip the allocation / page zeroing code for file systems which understand sparse files.
The core truncate code is changed to do a bottom up tree traversal. This gets abstracted out into it's own function. To make things more readable, most of the special case handling for in-inode extents from ocfs2_do_truncate() is also removed.
Though write support for sparse files comes in a later patch, we at least update ocfs2_prepare_inode_for_write() to skip allocation for sparse files.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|
#
363041a5 |
| 17-Jan-2007 |
Mark Fasheh <mark.fasheh@oracle.com> |
ocfs2: temporarily remove extent map caching
The code in extent_map.c is not prepared to deal with a subtree being rotated between lookups. This can happen when filling holes in sparse files. Instea
ocfs2: temporarily remove extent map caching
The code in extent_map.c is not prepared to deal with a subtree being rotated between lookups. This can happen when filling holes in sparse files. Instead of a lengthy patch to update the code (which would likely lose the benefit of caching subtree roots), we remove most of the algorithms and implement a simple path based lookup. A less ambitious extent caching scheme will be added in a later patch.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
show more ...
|