#
8b2c0dba |
| 17-Aug-2009 |
Tao Ma <tao.ma@oracle.com> |
ocfs2: Call refcount tree remove process properly.
Now with xattr refcount support, we need to check whether we have xattr refcounted before we remove the refcount tree.
Now the mechanism is: 1) Ch
ocfs2: Call refcount tree remove process properly.
Now with xattr refcount support, we need to check whether we have xattr refcounted before we remove the refcount tree.
Now the mechanism is: 1) Check whether i_clusters == 0, if no, exit. 2) check whether we have i_xattr_loc in dinode. if yes, exit. 2) Check whether we have inline xattr stored outside, if yes, exit. 4) Remove the tree.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
show more ...
|
#
0129241e |
| 21-Sep-2009 |
Tao Ma <tao.ma@oracle.com> |
ocfs2: Attach xattr clusters to refcount tree.
In ocfs2, when xattr's value is larger than OCFS2_XATTR_INLINE_SIZE, it will be kept outside of the blocks we store xattr entry. And they are stored in
ocfs2: Attach xattr clusters to refcount tree.
In ocfs2, when xattr's value is larger than OCFS2_XATTR_INLINE_SIZE, it will be kept outside of the blocks we store xattr entry. And they are stored in a b-tree also. So this patch try to attach all these clusters to refcount tree also.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
show more ...
|
#
47bca495 |
| 17-Aug-2009 |
Tao Ma <tao.ma@oracle.com> |
ocfs2: Abstract ocfs2 xattr tree extend rec iteration process.
Currently we have ocfs2_iterate_xattr_buckets which can receive a para and a callback to iterate a series of bucket. It is good. But ac
ocfs2: Abstract ocfs2 xattr tree extend rec iteration process.
Currently we have ocfs2_iterate_xattr_buckets which can receive a para and a callback to iterate a series of bucket. It is good. But actually the 2 callers ocfs2_xattr_tree_list_index_block and ocfs2_delete_xattr_index_block are almost the same. The only difference is that the latter need to handle the extent record also. So add a new function named ocfs2_iterate_xattr_index_block. It can be given func callback which are used for exten record. So now we only have one iteration function for the xattr index block. Ane what's more, it is useful for our future reflink operations.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
show more ...
|
#
5aea1f0e |
| 17-Aug-2009 |
Tao Ma <tao.ma@oracle.com> |
ocfs2: Abstract the creation of xattr block.
In xattr reflink, we also need to create xattr block, so abstract the process out.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
|
#
fd68a894 |
| 17-Aug-2009 |
Tao Ma <tao.ma@oracle.com> |
ocfs2: Remove inode from ocfs2_xattr_bucket_get_name_value.
In ocfs2_xattr_bucket_get_name_value, actually we only use super_block. So use it.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
|
#
492a8a33 |
| 17-Aug-2009 |
Tao Ma <tao.ma@oracle.com> |
ocfs2: Add CoW support for xattr.
In order to make 2 transcation(xattr and cow) independent with each other, we CoW the whole xattr out in case we are setting them.
Signed-off-by: Tao Ma <tao.ma@or
ocfs2: Add CoW support for xattr.
In order to make 2 transcation(xattr and cow) independent with each other, we CoW the whole xattr out in case we are setting them.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
show more ...
|
#
1061f9c1 |
| 17-Aug-2009 |
Tao Ma <tao.ma@oracle.com> |
ocfs2: Return extent flags for xattr value tree.
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 l
ocfs2: Return extent flags for xattr value tree.
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 <tao.ma@oracle.com>
show more ...
|
#
5e404e9e |
| 13-Feb-2009 |
Joel Becker <joel.becker@oracle.com> |
ocfs2: Pass ocfs2_caching_info into ocfs_init_*_extent_tree().
With this commit, extent tree operations are divorced from inodes and rely on ocfs2_caching_info. Phew!
Signed-off-by: Joel Becker <j
ocfs2: Pass ocfs2_caching_info into ocfs_init_*_extent_tree().
With this commit, extent tree operations are divorced from inodes and rely on ocfs2_caching_info. Phew!
Signed-off-by: Joel Becker <joel.becker@oracle.com>
show more ...
|
#
dbdcf6a4 |
| 13-Feb-2009 |
Joel Becker <joel.becker@oracle.com> |
ocfs2: ocfs2_remove_extent() no longer needs struct inode.
One more generic btree function that is isolated from struct inode.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
|
#
cbee7e1a |
| 13-Feb-2009 |
Joel Becker <joel.becker@oracle.com> |
ocfs2: ocfs2_add_clusters_in_btree() no longer needs struct inode.
One more function that doesn't need a struct inode to pass to its children.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
|
#
cc79d8c1 |
| 13-Feb-2009 |
Joel Becker <joel.becker@oracle.com> |
ocfs2: ocfs2_insert_extent() no longer needs struct inode.
One more function down, no inode in the entire insert-extent chain.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
|
#
facdb77f |
| 12-Feb-2009 |
Joel Becker <joel.becker@oracle.com> |
ocfs2: ocfs2_find_path() only needs the caching info
ocfs2_find_path and ocfs2_find_leaf() walk our btrees, reading extent blocks. They need struct ocfs2_caching_info for that, but not struct inode
ocfs2: ocfs2_find_path() only needs the caching info
ocfs2_find_path and ocfs2_find_leaf() walk our btrees, reading extent blocks. They need struct ocfs2_caching_info for that, but not struct inode.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
show more ...
|
#
0cf2f763 |
| 12-Feb-2009 |
Joel Becker <joel.becker@oracle.com> |
ocfs2: Pass struct ocfs2_caching_info to the journal functions.
The next step in divorcing metadata I/O management from struct inode is to pass struct ocfs2_caching_info to the journal functions. T
ocfs2: Pass struct ocfs2_caching_info to the journal functions.
The next step in divorcing metadata I/O management from struct inode is to pass struct ocfs2_caching_info to the journal functions. Thus the journal locks a metadata cache with the cache io_lock function. It also can compare ci_last_trans and ci_created_trans directly.
This is a large patch because of all the places we change ocfs2_journal_access..(handle, inode, ...) to ocfs2_journal_access..(handle, INODE_CACHE(inode), ...).
Signed-off-by: Joel Becker <joel.becker@oracle.com>
show more ...
|
#
8cb471e8 |
| 10-Feb-2009 |
Joel Becker <joel.becker@oracle.com> |
ocfs2: Take the inode out of the metadata read/write paths.
We are really passing the inode into the ocfs2_read/write_blocks() functions to get at the metadata cache. This commit passes the cache d
ocfs2: Take the inode out of the metadata read/write paths.
We are really passing the inode into the ocfs2_read/write_blocks() functions to get at the metadata cache. This commit passes the cache directly into the metadata block functions, divorcing them from the inode.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
show more ...
|
#
44d8e4e1 |
| 13-Jul-2009 |
Subrata Modak <subrata@linux.vnet.ibm.com> |
ocfs2: Fix compilation warning for fs/ocfs2/xattr.c
gcc 4.4.1 generates the following build warning on i386:
CC [M] fs/ocfs2/xattr.o fs/ocfs2/xattr.c: In function ‘ocfs2_xattr_block_get’: fs/ocfs2
ocfs2: Fix compilation warning for fs/ocfs2/xattr.c
gcc 4.4.1 generates the following build warning on i386:
CC [M] fs/ocfs2/xattr.o fs/ocfs2/xattr.c: In function ‘ocfs2_xattr_block_get’: fs/ocfs2/xattr.c:1055: warning: ‘block_off’ may be used uninitialized in this function
The following fix is based on a similar approach by David Howells few days back: http://lkml.org/lkml/2009/7/9/109,
Signed-off-by: Subrata Modak<subrata@linux.vnet.ibm.com>, Signed-off-by: Joel Becker <joel.becker@oracle.com>
show more ...
|
#
a46fa684 |
| 03-May-2009 |
Tao Ma <tao.ma@oracle.com> |
ocfs2: Don't printk the error when listing too many xattrs.
Currently the kernel defines XATTR_LIST_MAX as 65536 in include/linux/limits.h. This is the largest buffer that is used for listing xattr
ocfs2: Don't printk the error when listing too many xattrs.
Currently the kernel defines XATTR_LIST_MAX as 65536 in include/linux/limits.h. This is the largest buffer that is used for listing xattrs.
But with ocfs2 xattr tree, we actually have no limit for the number. If filesystem has more names than can fit in the buffer, the kernel logs will be pollluted with something like this when listing:
(27738,0):ocfs2_iterate_xattr_buckets:3158 ERROR: status = -34 (27738,0):ocfs2_xattr_tree_list_index_block:3264 ERROR: status = -34
So don't print "ERROR" message as this is not an ocfs2 error.
Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
show more ...
|
#
9b7895ef |
| 12-Nov-2008 |
Mark Fasheh <mfasheh@suse.com> |
ocfs2: Add a name indexed b-tree to directory inodes
This patch makes use of Ocfs2's flexible btree code to add an additional tree to directory inodes. The new tree stores an array of small, fixed-l
ocfs2: Add a name indexed b-tree to directory inodes
This patch makes use of Ocfs2's flexible btree code to add an additional tree to directory inodes. The new tree stores an array of small, fixed-length records in each leaf block. Each record stores a hash value, and pointer to a block in the traditional (unindexed) directory tree where a dirent with the given name hash resides. Lookup exclusively uses this tree to find dirents, thus providing us with constant time name lookups.
Some of the hashing code was copied from ext3. Unfortunately, it has lots of unfixed checkpatch errors. I left that as-is so that tracking changes would be easier.
Signed-off-by: Mark Fasheh <mfasheh@suse.com> Acked-by: Joel Becker <joel.becker@oracle.com>
show more ...
|
#
712e53e4 |
| 11-Mar-2009 |
Tao Ma <tao.ma@oracle.com> |
ocfs2: Use xs->bucket to set xattr value outside
A long time ago, xs->base is allocated a 4K size and all the contents in the bucket are copied to the it. Now we use ocfs2_xattr_bucket to abstract x
ocfs2: Use xs->bucket to set xattr value outside
A long time ago, xs->base is allocated a 4K size and all the contents in the bucket are copied to the it. Now we use ocfs2_xattr_bucket to abstract xattr bucket and xs->base is initialized to the start of the bu_bhs[0]. So xs->base + offset will overflow when the value root is stored outside the first block.
Then why we can survive the xattr test by now? It is because we always read the bucket contiguously now and kernel mm allocate continguous memory for us. We are lucky, but we should fix it. So just get the right value root as other callers do.
Signed-off-by: Tao Ma <tao.ma@oracle.com> Acked-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
show more ...
|
#
6c9fd1dc |
| 05-Mar-2009 |
Tiger Yang <tiger.yang@oracle.com> |
ocfs2: reserve xattr block for new directory with inline data
If this is a new directory with inline data, we choose to reserve the entire inline area for directory contents and force an external xa
ocfs2: reserve xattr block for new directory with inline data
If this is a new directory with inline data, we choose to reserve the entire inline area for directory contents and force an external xattr block.
Signed-off-by: Tiger Yang <tiger.yang@oracle.com> Acked-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
show more ...
|
#
4442f518 |
| 19-Feb-2009 |
Tiger Yang <tiger.yang@oracle.com> |
ocfs2: set gap to seperate entry and value when xattr in bucket
This patch set a gap (4 bytes) between xattr entry and name/value when xattr in bucket. This gap use to seperate entry and name/value
ocfs2: set gap to seperate entry and value when xattr in bucket
This patch set a gap (4 bytes) between xattr entry and name/value when xattr in bucket. This gap use to seperate entry and name/value when a bucket is full. It had already been set when xattr in inode/block.
Signed-off-by: Tiger Yang <tiger.yang@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
show more ...
|
#
c8b9cf9a |
| 24-Feb-2009 |
Tao Ma <tao.ma@oracle.com> |
ocfs2: lock the metaecc process for xattr bucket
For other metadata in ocfs2, metaecc is checked in ocfs2_read_blocks with io_mutex held. While for xattr bucket, it is calculated by the whole bucket
ocfs2: lock the metaecc process for xattr bucket
For other metadata in ocfs2, metaecc is checked in ocfs2_read_blocks with io_mutex held. While for xattr bucket, it is calculated by the whole buckets. So we have to add a spin_lock to prevent multiple processes calculating metaecc.
Signed-off-by: Tao Ma <tao.ma@oracle.com> Tested-by: Tristan Ye <tristan.ye@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
show more ...
|
#
89a907af |
| 16-Feb-2009 |
Tao Ma <tao.ma@oracle.com> |
ocfs2: Use the right access_* method in ctime update of xattr.
In ctime updating of xattr, it use the wrong type of access for inode, so use ocfs2_journal_access_di instead.
Reported-and-Tested-by:
ocfs2: Use the right access_* method in ctime update of xattr.
In ctime updating of xattr, it use the wrong type of access for inode, so use ocfs2_journal_access_di instead.
Reported-and-Tested-by: Tristan Ye <tristan.ye@oracle.com> Signed-off-by: Tao Ma <tao.ma@oracle.com> Acked-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
show more ...
|
#
554e7f9e |
| 07-Jan-2009 |
Tao Ma <tao.ma@oracle.com> |
ocfs2: Access the xattr bucket only before modifying it.
In ocfs2_xattr_value_truncate, we may call b-tree codes which will extend the journal transaction. It has a potential problem that it may let
ocfs2: Access the xattr bucket only before modifying it.
In ocfs2_xattr_value_truncate, we may call b-tree codes which will extend the journal transaction. It has a potential problem that it may let the already-accessed-but-not-dirtied buffers gone. So we'd better access the bucket after we call ocfs2_xattr_value_truncate. And as for the root buffer for the xattr value, b-tree code will acess and dirty it, so we don't need to worry about it.
Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
show more ...
|
#
38d59ef6 |
| 16-Dec-2008 |
Tiger Yang <tiger.yang@oracle.com> |
ocfs2: Add xattr support checking in init_security
We must check whether ocfs2 volume support xattr in init_security, if not support xattr and security is enable, would cause failure of mknod.
Sign
ocfs2: Add xattr support checking in init_security
We must check whether ocfs2 volume support xattr in init_security, if not support xattr and security is enable, would cause failure of mknod.
Signed-off-by: Tiger Yang <tiger.yang@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
show more ...
|
#
008aafaf |
| 09-Dec-2008 |
Tiger Yang <tiger.yang@oracle.com> |
ocfs2: alloc xattr bucket in ocfs2_xattr_set_handle
In extreme situation, may need xattr bucket for setting security entry and acl entries during mknod. This only happens when block size is too smal
ocfs2: alloc xattr bucket in ocfs2_xattr_set_handle
In extreme situation, may need xattr bucket for setting security entry and acl entries during mknod. This only happens when block size is too small.
Signed-off-by: Tiger Yang <tiger.yang@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
show more ...
|