tbd Sun Microsystems, Inc.
* version 3.0.8
-Severity :
-Bugzilla :
-Description:
-Details :
+Severity : minor
+Bugzilla : 16114
+Description: minor fixes and cleanups
+Details : use EXT_UNSET_BLOCK to avoid confusion with EXT_MAX_BLOCK.
+ Initialize 'ix' variable in extents patch to stop compiler warning.
+
+Severity : feature
+Bugzilla : 17942
+Description: update FIEMAP ioctl to match upstream kernel version
+Details : the FIEMAP block-mapping ioctl had a prototype version in
+ ldiskfs 3.0.7 but this release updates it to match the
+ interface in the upstream kernel, with a new ioctl number.
+
+Severity : normal
+Frequency : only if MMP is active and detects filesystem is in use
+Bugzilla : 18173
+Description: if MMP startup fails, an oops is triggered
+Details : if ldiskfs mounting doesn't succeed the error handling doesn't
+ clean up the MMP data correctly, causing an oops.
+
+-------------------------------------------------------------------------------
+
+2009-04-06 Sun Microsystems, Inc.
+ * version 3.0.7.1
+
+Severity : major
+Frequency : rare
+Bugzilla : 18810
+Description: fix racy locking of mballoc block bitmaps causing BUG
+Details : The locking of the mballoc buddy bitmap and the in-memory
+ block bitmap was using two different spin locks in some
+ cases. This made it possible to incorrectly access the
+ mballoc bitmap while another process was modifying it,
+ causing a sanity assertion to fail. While no on-disk corruption
+ was reported, there was some risk of this happening.
-------------------------------------------------------------------------------
-2009-01-15 Sun Microsystems, Inc.
+2009-02-07 Sun Microsystems, Inc.
* version 3.0.7
-Severity : normal
+Severity : enhancement
Bugzilla : 16498
Description: Get RAID stripe size from superblock
Details : RAID striping parameters are now saved in the superblock itself,
a mount option each time.
Severity : major
+Frequency : only if server is running on unsupported big-endian machine
Bugzilla : 16438
Description: Disable big-endian ldiskfs server support.
Details : The ldiskfs code is not tested on big-endian machines, and
possible to mount with the "bigendian_extents" option to
force the mount.
+Severity : major
+Frequency : only with software RAID-5
+Bugzilla : 17895
+Description: MMP block reads may fail to detect another user of the filesystem
+Details : with software RAID it is possible that the RAID driver will
+ cache the MMP block and not refetch it from disk. Force the
+ read to invalidate the RAID page cache and go directly to disk.
+
-------------------------------------------------------------------------------
2008-08-31 Sun Microsystems, Inc.
===================================================================
--- /dev/null
+++ linux-2.6.22.19/fs/ext3/mballoc.c
-@@ -0,0 +1,4475 @@
+@@ -0,0 +1,4483 @@
+/*
-+ * Copyright 2008 Sun Microsystems, Inc.
-+ * Written by Alex Tomas <alex@clusterfs.com>
++ * Copyright 2009 Sun Microsystems, Inc.
++ * Written by Alex Zhuravlev <alex.zhuravlev@sun.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ cur += 32;
+ continue;
+ }
-+ mb_clear_bit_atomic(lock, cur, bm);
++ if (lock)
++ mb_clear_bit_atomic(lock, cur, bm);
++ else
++ mb_clear_bit(cur, bm);
+ cur++;
+ }
+}
+ cur += 32;
+ continue;
+ }
-+ mb_set_bit_atomic(lock, cur, bm);
++ if (lock)
++ mb_set_bit_atomic(lock, cur, bm);
++ else
++ mb_set_bit(cur, bm);
+ cur++;
+ }
+}
+ BUG_ON(start + len > (e3b->bd_sb->s_blocksize << 3));
+ BUG_ON(e3b->bd_group != ex->fe_group);
+ BUG_ON(!ext3_is_group_locked(e3b->bd_sb, e3b->bd_group));
++ spin_lock(sb_bgl_lock(EXT3_SB(e3b->bd_sb), ex->fe_group));
+ mb_check_buddy(e3b);
+ mb_mark_used_double(e3b, start, len);
+
+ e3b->bd_info->bb_counters[ord]++;
+ }
+
-+ mb_set_bits(sb_bgl_lock(EXT3_SB(e3b->bd_sb), ex->fe_group),
-+ EXT3_MB_BITMAP(e3b), ex->fe_start, len0);
++ mb_set_bits(NULL, EXT3_MB_BITMAP(e3b), ex->fe_start, len0);
+ mb_check_buddy(e3b);
++ spin_unlock(sb_bgl_lock(EXT3_SB(e3b->bd_sb), ex->fe_group));
+
+ return ret;
+}
+ ext3_error(sb, __FUNCTION__,
+ "Allocating block in system zone - block = %lu",
+ (unsigned long) block);
++ ext3_lock_group(sb, ac->ac_b_ex.fe_group);
++ spin_lock(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group));
+#ifdef AGGRESSIVE_CHECK
+ {
+ int i;
+ }
+ }
+#endif
-+ mb_set_bits(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group), bitmap_bh->b_data,
++ mb_set_bits(NULL, bitmap_bh->b_data,
+ ac->ac_b_ex.fe_start, ac->ac_b_ex.fe_len);
+
-+ spin_lock(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group));
+ gdp->bg_free_blocks_count =
+ cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count)
+ - ac->ac_b_ex.fe_len);
+ spin_unlock(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group));
+ percpu_counter_mod(&sbi->s_freeblocks_counter, - ac->ac_b_ex.fe_len);
++ ext3_unlock_group(sb, ac->ac_b_ex.fe_group);
+
+ err = ext3_journal_dirty_metadata(handle, bitmap_bh);
+ if (err)
+ unsigned short max = EXT3_BLOCKS_PER_GROUP(sb);
+ unsigned short i, first, free = 0;
+
++ spin_lock(sb_bgl_lock(EXT3_SB(sb), group));
+ i = mb_find_next_zero_bit(bitmap, max, 0);
+
+ while (i < max) {
+ }
+
+ if (free != le16_to_cpu(gdp->bg_free_blocks_count)) {
++ spin_unlock(sb_bgl_lock(EXT3_SB(sb), group));
+ ext3_error(sb, __FUNCTION__, "on-disk bitmap for group %d"
+ "corrupted: %u blocks free in bitmap, %u - in gd\n",
+ group, free, le16_to_cpu(gdp->bg_free_blocks_count));
+ return -EIO;
+ }
++ spin_unlock(sb_bgl_lock(EXT3_SB(sb), group));
+ return 0;
+}
+
+ BUG_ON(e3b->bd_bitmap_page == NULL);
+ BUG_ON(e3b->bd_buddy_page == NULL);
+
-+ ext3_lock_group(sb, group);
+ for (i = 0; i < count; i++) {
+ md = db->bb_md_cur;
+ if (md && db->bb_tid != handle->h_transaction->t_tid) {
+ db->bb_md_cur = NULL;
+ }
+ }
-+ ext3_unlock_group(sb, group);
+ return 0;
+}
+
+ if (err)
+ goto error_return;
+
++ ext3_lock_group(sb, block_group);
++ spin_lock(sb_bgl_lock(sbi, block_group));
+#ifdef AGGRESSIVE_CHECK
+ {
+ int i;
+ BUG_ON(!mb_test_bit(bit + i, bitmap_bh->b_data));
+ }
+#endif
-+ mb_clear_bits(sb_bgl_lock(sbi, block_group), bitmap_bh->b_data, bit,
-+ count);
-+
-+ /* We dirtied the bitmap block */
-+ BUFFER_TRACE(bitmap_bh, "dirtied bitmap block");
-+ err = ext3_journal_dirty_metadata(handle, bitmap_bh);
-+
-+ ac.ac_b_ex.fe_group = block_group;
-+ ac.ac_b_ex.fe_start = bit;
-+ ac.ac_b_ex.fe_len = count;
-+ ext3_mb_store_history(&ac);
++ mb_clear_bits(NULL, bitmap_bh->b_data, bit, count);
++ gdp->bg_free_blocks_count =
++ cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) + count);
++ spin_unlock(sb_bgl_lock(sbi, block_group));
++ percpu_counter_mod(&sbi->s_freeblocks_counter, count);
+
+ if (metadata) {
+ /* blocks being freed are metadata. these blocks shouldn't
+ * be used until this transaction is committed */
+ ext3_mb_free_metadata(handle, &e3b, block_group, bit, count);
+ } else {
-+ ext3_lock_group(sb, block_group);
+ err = mb_free_blocks(inode, &e3b, bit, count);
+ ext3_mb_return_to_preallocation(inode, &e3b, block, count);
-+ ext3_unlock_group(sb, block_group);
+ BUG_ON(err != 0);
+ }
++ ext3_unlock_group(sb, block_group);
+
-+ spin_lock(sb_bgl_lock(sbi, block_group));
-+ gdp->bg_free_blocks_count =
-+ cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) + count);
-+ spin_unlock(sb_bgl_lock(sbi, block_group));
-+ percpu_counter_mod(&sbi->s_freeblocks_counter, count);
++ ac.ac_b_ex.fe_group = block_group;
++ ac.ac_b_ex.fe_start = bit;
++ ac.ac_b_ex.fe_len = count;
++ ext3_mb_store_history(&ac);
++
++ /* We dirtied the bitmap block */
++ BUFFER_TRACE(bitmap_bh, "dirtied bitmap block");
++ err = ext3_journal_dirty_metadata(handle, bitmap_bh);
+
+ ext3_mb_release_desc(&e3b);
+