X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=ldiskfs%2Fkernel_patches%2Fpatches%2Fext4-mballoc-pa_free-mismatch.patch;h=0ca58ddd20b10f3692f2c0ef627dbb716b2bdf6b;hb=c7b5d883aa0b825ebdb3c73fa50c09b095512b94;hp=cc8682a30cc91b047c15aa6714d8e39004e1430e;hpb=2d3aaef4122c11dcb6d892da89522ffa37036136;p=fs%2Flustre-release.git diff --git a/ldiskfs/kernel_patches/patches/ext4-mballoc-pa_free-mismatch.patch b/ldiskfs/kernel_patches/patches/ext4-mballoc-pa_free-mismatch.patch index cc8682a..0ca58dd 100644 --- a/ldiskfs/kernel_patches/patches/ext4-mballoc-pa_free-mismatch.patch +++ b/ldiskfs/kernel_patches/patches/ext4-mballoc-pa_free-mismatch.patch @@ -5,7 +5,7 @@ Index: linux-stage/fs/ext4/mballoc.c @@ -3892,6 +3892,7 @@ INIT_LIST_HEAD(&pa->pa_group_list); pa->pa_deleted = 0; - pa->pa_linear = 0; + pa->pa_type = MB_INODE_PA; + pa->pa_error = 0; mb_debug("new inode pa %p: %llu/%u for %u\n", pa, @@ -13,18 +13,17 @@ Index: linux-stage/fs/ext4/mballoc.c @@ -3956,6 +3957,7 @@ INIT_LIST_HEAD(&pa->pa_group_list); pa->pa_deleted = 0; - pa->pa_linear = 1; + pa->pa_type = MB_GROUP_PA; + pa->pa_error = 0; mb_debug("new group pa %p: %llu/%u for %u\n", pa, pa->pa_pstart, pa->pa_len, pa->pa_lstart); -@@ -4019,7 +4021,10 @@ +@@ -4019,7 +4021,9 @@ int err = 0; int free = 0; -+ BUG_ON(!ext4_is_group_locked(sb, e4b->bd_group)); ++ assert_spin_locked(ext4_group_lock_ptr(sb, e4b->bd_group)); BUG_ON(pa->pa_deleted == 0); -+ BUG_ON(pa->pa_linear != 0); + BUG_ON(pa->pa_inode == NULL); ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit); grp_blk_start = pa->pa_pstart - bit; @@ -122,10 +121,10 @@ Index: linux-stage/fs/ext4/mballoc.c + printk(KERN_WARNING "Release to readonly device %s (%#x): " + "[inode %lu] [block %lu] [count %lu] [is_meta %d]\n", + bdev->bd_disk ? bdev->bd_disk->disk_name : "", -+ bdev->bd_dev, inode->i_ino, block, count, metadata); ++ bdev->bd_dev, inode->i_ino, (unsigned long)block, count, metadata); + } + - ext4_debug("freeing block %lu\n", block); + ext4_debug("freeing block %llu\n", block); trace_mark(ext4_free_blocks, "dev %s block %llu count %lu metadata %d ino %lu", Index: linux-stage/fs/ext4/mballoc.h @@ -141,9 +140,9 @@ Index: linux-stage/fs/ext4/mballoc.h #include "ext4.h" #include "group.h" @@ -134,6 +135,7 @@ - unsigned short pa_free; /* how many blocks are free */ - unsigned short pa_linear; /* consumed in one direction - * strictly, for grp prealloc */ + ext4_grpblk_t pa_len; /* len of preallocated chunk */ + ext4_grpblk_t pa_free; /* how many blocks are free */ + unsigned short pa_type; /* pa type. inode or group */ + unsigned short pa_error; spinlock_t *pa_obj_lock; struct inode *pa_inode; /* hack, for history only */