Hi Linus, The majority of these Ocfs2 patches were sent to the list back in September: http://lkml.org/lkml/2008/9/24/383 All feedback has been incorporated - my original e-mail describing the contents of our tree is attached below. The only exception is that I added (after the initial send to lkml) an internal api cleanup series from Joel. This doesn't really make any functional changes, but simplifies our block I/O handling code in anticipation of some features we're planning for 2.6.29. For reference, these changes are the topmost 6 patches in the branch. I don't think they're are particularly controversial or tricky. --Mark Please pull from 'upstream-linus' branch of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git upstream-linus to receive the following updates: Documentation/filesystems/ocfs2.txt | 6 + fs/Kconfig | 34 +- fs/ocfs2/Makefile | 3 +- fs/ocfs2/alloc.c | 913 +++++-- fs/ocfs2/alloc.h | 86 +- fs/ocfs2/aops.c | 60 +- fs/ocfs2/buffer_head_io.c | 134 +- fs/ocfs2/buffer_head_io.h | 23 +- fs/ocfs2/cluster/masklog.c | 1 + fs/ocfs2/cluster/masklog.h | 1 + fs/ocfs2/dir.c | 109 +- fs/ocfs2/dlmglue.c | 9 +- fs/ocfs2/extent_map.c | 70 +- fs/ocfs2/extent_map.h | 4 + fs/ocfs2/file.c | 333 +-- fs/ocfs2/file.h | 32 +- fs/ocfs2/inode.c | 87 +- fs/ocfs2/inode.h | 6 +- fs/ocfs2/ioctl.c | 3 +- fs/ocfs2/journal.c | 89 +- fs/ocfs2/journal.h | 52 +- fs/ocfs2/localalloc.c | 384 +++- fs/ocfs2/localalloc.h | 4 + fs/ocfs2/locks.c | 15 + fs/ocfs2/locks.h | 1 + fs/ocfs2/namei.c | 101 +- fs/ocfs2/ocfs2.h | 56 +- fs/ocfs2/ocfs2_fs.h | 220 ++- fs/ocfs2/ocfs2_jbd_compat.h | 82 + fs/ocfs2/resize.c | 11 +- fs/ocfs2/slot_map.c | 7 +- fs/ocfs2/stack_user.c | 33 + fs/ocfs2/stackglue.c | 20 + fs/ocfs2/stackglue.h | 19 + fs/ocfs2/suballoc.c | 248 ++- fs/ocfs2/suballoc.h | 26 +- fs/ocfs2/super.c | 62 +- fs/ocfs2/symlink.c | 18 +- fs/ocfs2/uptodate.c | 38 +- fs/ocfs2/uptodate.h | 3 + fs/ocfs2/xattr.c | 4834 +++++++++++++++++++++++++++++++++++ fs/ocfs2/xattr.h | 68 + 42 files changed, 7359 insertions(+), 946 deletions(-) create mode 100644 fs/ocfs2/ocfs2_jbd_compat.h create mode 100644 fs/ocfs2/xattr.c create mode 100644 fs/ocfs2/xattr.h Joel Becker (21): ocfs2: Prefix the extent tree operations structure. ocfs2: Prefix the ocfs2_extent_tree structure. ocfs2: Make ocfs2_extent_tree get/put instead of alloc. ocfs2: Make 'private' into 'object' on ocfs2_extent_tree. ocfs2: Provide the get_root_el() method to ocfs2_extent_tree_operations. ocfs2: Use struct ocfs2_extent_tree in ocfs2_num_free_extents(). ocfs2: Determine an extent tree's max_leaf_clusters in an et_op. ocfs2: Create specific get_extent_tree functions. ocfs2: Add an insertion check to ocfs2_extent_tree_operations. ocfs2: Make ocfs2_extent_tree the first-class representation of a tree. ocfs2: Comment struct ocfs2_extent_tree_operations. ocfs2: Change ocfs2_get_*_extent_tree() to ocfs2_init_*_extent_tree() ocfs2: Limit inode allocation to 32bits. ocfs2: Add the 'inode64' mount option. ocfs2: Switch over to JBD2. ocfs2: Separate out sync reads from ocfs2_read_blocks() ocfs2: Require an inode for ocfs2_read_block(s)(). ocfs2: Simplify ocfs2_read_block() ocfs2: Move ocfs2_bread() into dir.c ocfs2: Kill the last naked wait_on_buffer() for cached reads. ocfs2: Make cached block reads the common case. Mark Fasheh (12): ocfs2: POSIX file locks support ocfs2: Track local alloc bits internally ocfs2: throttle back local alloc when low on disk space ocfs2: track local alloc state via debugfs ocfs2: fix printk format warnings ocfs2: Remove pointless !! ocfs2: make la_debug_mutex static ocfs2: Documentation update for user_xattr / nouser_xattr mount options ocfs2: use smaller counters in ocfs2_remove_xattr_clusters_from_cache ocfs2: Don't check for NULL before brelse() ocfs2: Uninline ocfs2_xattr_name_hash() ocfs2: Move trusted and user attribute support into xattr.c Sunil Mushran (1): ocfs2: Add xattr mount option in ocfs2_show_options() Tao Ma (19): ocfs2: Modify ocfs2_num_free_extents for future xattr usage. ocfs2: Use ocfs2_extent_list instead of ocfs2_dinode. ocfs2: Abstract ocfs2_extent_tree in b-tree operations. ocfs2: Make high level btree extend code generic ocfs2: Add the basic xattr disk layout in ocfs2_fs.h ocfs2: Add helper function in uptodate.c for removing xattr clusters ocfs2: Add extent tree operation for xattr value btrees ocfs2: Add xattr index tree operations ocfs2: Add xattr bucket iteration for large numbers of EAs ocfs2: Add xattr lookup code xattr btrees ocfs2: Optionally limit extent size in ocfs2_insert_extent() ocfs2: Enable xattr set in index btree ocfs2: Delete all xattr buckets during inode removal ocfs2: bug-fix for journal extend in xattr. ocfs2: Resolve deadlock in ocfs2_xattr_free_block. ocfs2/xattr.c: Fix a bug when inserting xattr. ocfs2: Add empty bucket support in xattr. ocfs2: Calculate EA hash only by its suffix. ocfs2: Refactor xattr list and remove ocfs2_xattr_handler(). Tiger Yang (3): ocfs2: reserve inline space for extended attribute ocfs2: Add extended attribute support ocfs2: Add incompatible flag for extended attribute Hi, The following patches comprise the bulk of Ocfs2 updates for the 2.6.28 merge window. They can roughly be broken up into 4 sets which add incremental features to Ocfs2. The patches are presented as they come in git. EA Support The largest set adds support for extended attributes in Ocfs2. Extended attributes are stored both within the inode block, and externally, when their numbers grow. Individual attributes can be arbitrarily sized. Smaller ones have their data stored inline. Larger attributes grow out to a btree. In theory the btrees have similar limits to inode data. In practice though, the VFS limits EA sizes to 64K. When inode space for attributes run low, new ones are created in an external disk block. When the block fills up, external attributes are moved to an indexed btree. The btree can store many thousands of attributes, if needed. The patches leading up to EA support further abstracted portions of the Ocfs2 btree code. Ultimately, this means we can "add" a btree to any Ocfs2 structure by embedding a header, and providing the proper callbacks to manipulate certain key fields. The xattr code makes use of this, as will future Ocfs2 features. Joel made some further improvements to our 'generic' (for Ocfs2 at least) btree support which completed the interface by cleaning things up and providing for proper callbacks in a static operations structure. Those patches follow the xattr series as they were developed afterwards. JBD2 Support Ocfs2 can now use JBD2. Amongst other benefits, this allows us to support large block devices with more than 32 bits worth of block numbers. As a part of these patches, and 'inode64' mount option is added which toggles creation of inodes whose inode number requires more than 32 bits to be adequately described. JBD2 support in Ocfs2 is compiled in by default, however since journaling is so central to the operation of a file system, we kept our 'legacy' JBD support. We did this to provide a fallback for any users who might hit a problem, while we fix it. Legacy JBD support will be removed from Ocfs2 in 2.6.29. Cluster Aware POSIX File Locks This was added via the 'plock' interface which Dave Teigland pulled into fs/dlm last merge window. The majority of the support is actually provided in userspace via the dlm_controld. As a result, cluster-aware POSIX locks only work for userspace cluster stacks right now. Local Alloc Throttling These patches allow the "local alloc" file in Ocfs2 to throttle back the number of free disk blocks it caches. This is done during times of extreme fragmentation, or very low disk space. The traditional behavior was to completely disable the local alloc feature, which resulted in performance problems on some corner cases. The throttling has increased performance by 10 times during such situations.
Randy Dunlap
2008-Oct-15 01:20 UTC
[Ocfs2-devel] [git patches] Ocfs2 features for 2.6.28 (build errors)
On Tue, 14 Oct 2008 13:03:19 -0700 Mark Fasheh wrote:> Hi Linus, > > The majority of these Ocfs2 patches were sent to the list back in > September: > > http://lkml.org/lkml/2008/9/24/383 > > All feedback has been incorporated - my original e-mail describing the > contents of our tree is attached below. > > The only exception is that I added (after the initial send to lkml) an > internal api cleanup series from Joel. This doesn't really make any > functional changes, but simplifies our block I/O handling code in > anticipation of some features we're planning for 2.6.29. For reference, > these changes are the topmost 6 patches in the branch. I don't think they're > are particularly controversial or tricky. > --Mark > > Please pull from 'upstream-linus' branch of > git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git upstream-linusIn 2.6.27-git5 I am seeing build errors as follow: fs/ocfs2/xattr.c: In function 'ocfs2_xattr_bucket_find': fs/ocfs2/xattr.c:2352: error: 'OCFS2_BH_CACHED' undeclared (first use in this function) fs/ocfs2/xattr.c:2352: error: (Each undeclared identifier is reported only once fs/ocfs2/xattr.c:2352: error: for each function it appears in.) fs/ocfs2/xattr.c: In function 'ocfs2_iterate_xattr_buckets': fs/ocfs2/xattr.c:2429: error: 'OCFS2_BH_CACHED' undeclared (first use in this function) fs/ocfs2/xattr.c: In function 'ocfs2_xattr_update_xattr_search': fs/ocfs2/xattr.c:2697: error: 'OCFS2_BH_CACHED' undeclared (first use in this function) fs/ocfs2/xattr.c: In function 'ocfs2_defrag_xattr_bucket': fs/ocfs2/xattr.c:2902: error: 'OCFS2_BH_CACHED' undeclared (first use in this function) fs/ocfs2/xattr.c: In function 'ocfs2_read_xattr_bucket': fs/ocfs2/xattr.c:3157: error: 'OCFS2_BH_CACHED' undeclared (first use in this function) fs/ocfs2/xattr.c: In function 'ocfs2_xattr_set_entry_in_bucket': fs/ocfs2/xattr.c:4104: error: 'OCFS2_BH_CACHED' undeclared (first use in this function) make[2]: *** [fs/ocfs2/xattr.o] Error 1 --- ~Randy
Mark Fasheh
2008-Oct-15 01:36 UTC
[Ocfs2-devel] [git patches] Ocfs2 features for 2.6.28 (build errors)
On Tue, Oct 14, 2008 at 06:20:37PM -0700, Randy Dunlap wrote:> In 2.6.27-git5 I am seeing build errors as follow: > > fs/ocfs2/xattr.c: In function 'ocfs2_xattr_bucket_find': > fs/ocfs2/xattr.c:2352: error: 'OCFS2_BH_CACHED' undeclared (first use in this function) > fs/ocfs2/xattr.c:2352: error: (Each undeclared identifier is reported only once > fs/ocfs2/xattr.c:2352: error: for each function it appears in.) > fs/ocfs2/xattr.c: In function 'ocfs2_iterate_xattr_buckets': > fs/ocfs2/xattr.c:2429: error: 'OCFS2_BH_CACHED' undeclared (first use in this function) > fs/ocfs2/xattr.c: In function 'ocfs2_xattr_update_xattr_search': > fs/ocfs2/xattr.c:2697: error: 'OCFS2_BH_CACHED' undeclared (first use in this function) > fs/ocfs2/xattr.c: In function 'ocfs2_defrag_xattr_bucket': > fs/ocfs2/xattr.c:2902: error: 'OCFS2_BH_CACHED' undeclared (first use in this function) > fs/ocfs2/xattr.c: In function 'ocfs2_read_xattr_bucket': > fs/ocfs2/xattr.c:3157: error: 'OCFS2_BH_CACHED' undeclared (first use in this function) > fs/ocfs2/xattr.c: In function 'ocfs2_xattr_set_entry_in_bucket': > fs/ocfs2/xattr.c:4104: error: 'OCFS2_BH_CACHED' undeclared (first use in this function) > make[2]: *** [fs/ocfs2/xattr.o] Error 1Argh, I must have forgotten to commit my merge fixes for that file. This patch should fix things. Thanks for reporting this Randy. The following patch can also be pulled: Please pull from 'build_fix' branch of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git build_fix --Mark -- Mark Fasheh From: Mark Fasheh <mfasheh at suse.com> ocfs2: fix build error I merged the latest ocfs2_read_blocks() changes in xattr.c wrong. This makes Ocfs2 compile again. Signed-off-by: Mark Fasheh <mfasheh at suse.com> --- fs/ocfs2/xattr.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index c25780a..802c414 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -2349,7 +2349,7 @@ static int ocfs2_xattr_bucket_find(struct inode *inode, */ ret = ocfs2_read_blocks(inode, xs->bucket.bhs[0]->b_blocknr + 1, blk_per_bucket - 1, &xs->bucket.bhs[1], - OCFS2_BH_CACHED); + 0); if (ret) { mlog_errno(ret); goto out; @@ -2426,7 +2426,7 @@ static int ocfs2_iterate_xattr_buckets(struct inode *inode, for (i = 0; i < num_buckets; i++, blkno += blk_per_bucket) { ret = ocfs2_read_blocks(inode, blkno, blk_per_bucket, - bucket.bhs, OCFS2_BH_CACHED); + bucket.bhs, 0); if (ret) { mlog_errno(ret); goto out; @@ -2694,7 +2694,7 @@ static int ocfs2_xattr_update_xattr_search(struct inode *inode, ret = ocfs2_read_blocks(inode, xs->bucket.bhs[0]->b_blocknr + 1, blk_per_bucket - 1, &xs->bucket.bhs[1], - OCFS2_BH_CACHED); + 0); if (ret) { mlog_errno(ret); return ret; @@ -2898,8 +2898,7 @@ static int ocfs2_defrag_xattr_bucket(struct inode *inode, if (!bhs) return -ENOMEM; - ret = ocfs2_read_blocks(inode, blkno, blk_per_bucket, bhs, - OCFS2_BH_CACHED); + ret = ocfs2_read_blocks(inode, blkno, blk_per_bucket, bhs, 0); if (ret) goto out; @@ -3153,8 +3152,7 @@ static int ocfs2_read_xattr_bucket(struct inode *inode, if (!new) return ocfs2_read_blocks(inode, blkno, - blk_per_bucket, bhs, - OCFS2_BH_CACHED); + blk_per_bucket, bhs, 0); for (i = 0; i < blk_per_bucket; i++) { bhs[i] = sb_getblk(inode->i_sb, blkno + i); @@ -4101,7 +4099,7 @@ static int ocfs2_xattr_set_entry_in_bucket(struct inode *inode, ret = ocfs2_read_blocks(inode, xs->bucket.bhs[0]->b_blocknr + 1, blk_per_bucket - 1, &xs->bucket.bhs[1], - OCFS2_BH_CACHED); + 0); if (ret) { mlog_errno(ret); goto out; -- 1.5.4.1