[Pkg-lustre-svn-commit] r310 - in /trunk/ldiskfs/kernel_patches: patches/ext3-nanosecond-2.6.23-vanilla.patch series/ldiskfs-2.6.23-vanilla.series
pwinnertz-guest at users.alioth.debian.org
pwinnertz-guest at users.alioth.debian.org
Fri Sep 14 15:17:09 UTC 2007
Author: pwinnertz-guest
Date: Fri Sep 14 15:17:09 2007
New Revision: 310
URL: http://svn.debian.org/wsvn/pkg-lustre/?sc=1&rev=310
Log:
we need a own patch for 2.6.23, some things have changed
Added:
trunk/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.23-vanilla.patch
Modified:
trunk/ldiskfs/kernel_patches/series/ldiskfs-2.6.23-vanilla.series
Added: trunk/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.23-vanilla.patch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.23-vanilla.patch?rev=310&op=file
==============================================================================
--- trunk/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.23-vanilla.patch (added)
+++ trunk/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.23-vanilla.patch Fri Sep 14 15:17:09 2007
@@ -1,0 +1,404 @@
+Index: linux-stage/fs/ext3/ialloc.c
+===================================================================
+--- linux-stage.orig/fs/ext3/ialloc.c 2007-09-10 17:04:21.000000000 +0200
++++ linux-stage/fs/ext3/ialloc.c 2007-09-10 17:05:30.000000000 +0200
+@@ -727,7 +727,8 @@
+ inode->i_ino = ino + group * EXT3_INODES_PER_GROUP(sb);
+ /* This is the optimal IO size (for stat), not the fs block size */
+ inode->i_blocks = 0;
+- inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
++ inode->i_mtime = inode->i_atime = inode->i_ctime = ei->i_crtime =
++ ext3_current_time(inode);
+
+ memset(ei->i_data, 0, sizeof(ei->i_data));
+ ei->i_dir_start_lookup = 0;
+@@ -761,9 +762,8 @@
+ spin_unlock(&sbi->s_next_gen_lock);
+
+ ei->i_state = EXT3_STATE_NEW;
+- ei->i_extra_isize =
+- (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ?
+- sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0;
++
++ ei->i_extra_isize = EXT3_SB(sb)->s_want_extra_isize;
+
+ ret = inode;
+ if(DQUOT_ALLOC_INODE(inode)) {
+Index: linux-stage/fs/ext3/inode.c
+===================================================================
+--- linux-stage.orig/fs/ext3/inode.c 2007-09-10 16:58:15.000000000 +0200
++++ linux-stage/fs/ext3/inode.c 2007-09-10 17:07:14.000000000 +0200
+@@ -727,7 +727,7 @@
+
+ /* We are done with atomic stuff, now do the rest of housekeeping */
+
+- inode->i_ctime = CURRENT_TIME_SEC;
++ inode->i_ctime = ext3_current_time(inode);
+ ext3_mark_inode_dirty(handle, inode);
+
+ /* had we spliced it onto indirect block? */
+@@ -2367,7 +2367,7 @@
+ ext3_discard_reservation(inode);
+
+ mutex_unlock(&ei->truncate_mutex);
+- inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
++ inode->i_mtime = inode->i_ctime = ext3_current_time(inode);
+ ext3_mark_inode_dirty(handle, inode);
+
+ /*
+@@ -2622,10 +2622,6 @@
+ }
+ inode->i_nlink = le16_to_cpu(raw_inode->i_links_count);
+ inode->i_size = le32_to_cpu(raw_inode->i_size);
+- inode->i_atime.tv_sec = (signed)le32_to_cpu(raw_inode->i_atime);
+- inode->i_ctime.tv_sec = (signed)le32_to_cpu(raw_inode->i_ctime);
+- inode->i_mtime.tv_sec = (signed)le32_to_cpu(raw_inode->i_mtime);
+- inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 0;
+
+ ei->i_state = 0;
+ ei->i_dir_start_lookup = 0;
+@@ -2699,6 +2695,11 @@
+ } else
+ ei->i_extra_isize = 0;
+
++ EXT3_INODE_GET_XTIME(i_ctime, inode, raw_inode);
++ EXT3_INODE_GET_XTIME(i_mtime, inode, raw_inode);
++ EXT3_INODE_GET_XTIME(i_atime, inode, raw_inode);
++ EXT3_EINODE_GET_XTIME(i_crtime, ei, raw_inode);
++
+ if (S_ISREG(inode->i_mode)) {
+ inode->i_op = &ext3_file_inode_operations;
+ inode->i_fop = &ext3_file_operations;
+@@ -2780,9 +2781,12 @@
+ }
+ raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
+ raw_inode->i_size = cpu_to_le32(ei->i_disksize);
+- raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec);
+- raw_inode->i_ctime = cpu_to_le32(inode->i_ctime.tv_sec);
+- raw_inode->i_mtime = cpu_to_le32(inode->i_mtime.tv_sec);
++
++ EXT3_INODE_SET_XTIME(i_ctime, inode, raw_inode);
++ EXT3_INODE_SET_XTIME(i_mtime, inode, raw_inode);
++ EXT3_INODE_SET_XTIME(i_atime, inode, raw_inode);
++ EXT3_EINODE_SET_XTIME(i_crtime, ei, raw_inode);
++
+ raw_inode->i_blocks = cpu_to_le32(inode->i_blocks);
+ raw_inode->i_dtime = cpu_to_le32(ei->i_dtime);
+ raw_inode->i_flags = cpu_to_le32(ei->i_flags);
+Index: linux-stage/fs/ext3/ioctl.c
+===================================================================
+--- linux-stage.orig/fs/ext3/ioctl.c 2007-09-10 16:56:51.000000000 +0200
++++ linux-stage/fs/ext3/ioctl.c 2007-09-10 17:05:30.000000000 +0200
+@@ -123,7 +123,7 @@
+ ei->i_flags = flags;
+
+ ext3_set_inode_flags(inode);
+- inode->i_ctime = CURRENT_TIME_SEC;
++ inode->i_ctime = ext3_current_time(inode);
+
+ err = ext3_mark_iloc_dirty(handle, inode, &iloc);
+ flags_err:
+@@ -160,7 +160,7 @@
+ return PTR_ERR(handle);
+ err = ext3_reserve_inode_write(handle, inode, &iloc);
+ if (err == 0) {
+- inode->i_ctime = CURRENT_TIME_SEC;
++ inode->i_ctime = ext3_current_time(inode);
+ inode->i_generation = generation;
+ err = ext3_mark_iloc_dirty(handle, inode, &iloc);
+ }
+Index: linux-stage/fs/ext3/namei.c
+===================================================================
+--- linux-stage.orig/fs/ext3/namei.c 2007-09-10 17:04:15.000000000 +0200
++++ linux-stage/fs/ext3/namei.c 2007-09-10 17:06:23.000000000 +0200
+@@ -1320,7 +1320,7 @@
+ * happen is that the times are slightly out of date
+ * and/or different from the directory change time.
+ */
+- dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
++ dir->i_mtime = dir->i_ctime = ext3_current_time(dir);
+ ext3_update_dx_flag(dir);
+ dir->i_version++;
+ ext3_mark_inode_dirty(handle, dir);
+@@ -2091,7 +2091,7 @@
+ inode->i_version++;
+ clear_nlink(inode);
+ ext3_orphan_add(handle, inode);
+- inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
++ inode->i_ctime = dir->i_ctime = dir->i_mtime = ext3_current_time(inode);
+ ext3_mark_inode_dirty(handle, inode);
+ ext3_dec_count(handle, dir);
+ ext3_update_dx_flag(dir);
+@@ -2141,13 +2141,13 @@
+ retval = ext3_delete_entry(handle, dir, de, bh);
+ if (retval)
+ goto end_unlink;
+- dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
++ dir->i_ctime = dir->i_mtime = ext3_current_time(dir);
+ ext3_update_dx_flag(dir);
+ ext3_mark_inode_dirty(handle, dir);
+ drop_nlink(inode);
+ if (!inode->i_nlink)
+ ext3_orphan_add(handle, inode);
+- inode->i_ctime = dir->i_ctime;
++ inode->i_ctime = ext3_current_time(inode);
+ ext3_mark_inode_dirty(handle, inode);
+ retval = 0;
+
+@@ -2255,7 +2255,7 @@
+ if (IS_DIRSYNC(dir))
+ handle->h_sync = 1;
+
+- inode->i_ctime = CURRENT_TIME_SEC;
++ inode->i_ctime = ext3_current_time(inode);
+ inc_nlink(inode);
+ atomic_inc(&inode->i_count);
+
+@@ -2358,7 +2358,7 @@
+ * Like most other Unix systems, set the ctime for inodes on a
+ * rename.
+ */
+- old_inode->i_ctime = CURRENT_TIME_SEC;
++ old_inode->i_ctime = ext3_current_time(old_inode);
+ ext3_mark_inode_dirty(handle, old_inode);
+
+ /*
+@@ -2391,9 +2391,9 @@
+
+ if (new_inode) {
+ drop_nlink(new_inode);
+- new_inode->i_ctime = CURRENT_TIME_SEC;
++ new_inode->i_ctime = ext3_current_time(new_inode);
+ }
+- old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC;
++ old_dir->i_ctime = old_dir->i_mtime = ext3_current_time(old_dir);
+ ext3_update_dx_flag(old_dir);
+ if (dir_bh) {
+ BUFFER_TRACE(dir_bh, "get_write_access");
+Index: linux-stage/fs/ext3/super.c
+===================================================================
+--- linux-stage.orig/fs/ext3/super.c 2007-09-10 17:04:21.000000000 +0200
++++ linux-stage/fs/ext3/super.c 2007-09-10 17:05:30.000000000 +0200
+@@ -1720,6 +1720,8 @@
+ sbi->s_inode_size);
+ goto failed_mount;
+ }
++ if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE)
++ sb->s_time_gran = 1 << (EXT3_EPOCH_BITS - 2);
+ }
+ sbi->s_frag_size = EXT3_MIN_FRAG_SIZE <<
+ le32_to_cpu(es->s_log_frag_size);
+@@ -1923,6 +1925,32 @@
+ }
+
+ ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY);
++
++ /* determine the minimum size of new large inodes, if present */
++ if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE) {
++ sbi->s_want_extra_isize = sizeof(struct ext3_inode) -
++ EXT3_GOOD_OLD_INODE_SIZE;
++ if (EXT3_HAS_RO_COMPAT_FEATURE(sb,
++ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE)) {
++ if (sbi->s_want_extra_isize <
++ le16_to_cpu(es->s_want_extra_isize))
++ sbi->s_want_extra_isize =
++ le16_to_cpu(es->s_want_extra_isize);
++ if (sbi->s_want_extra_isize <
++ le16_to_cpu(es->s_min_extra_isize))
++ sbi->s_want_extra_isize =
++ le16_to_cpu(es->s_min_extra_isize);
++ }
++ }
++ /* Check if enough inode space is available */
++ if (EXT3_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize >
++ sbi->s_inode_size) {
++ sbi->s_want_extra_isize = sizeof(struct ext3_inode) -
++ EXT3_GOOD_OLD_INODE_SIZE;
++ printk(KERN_INFO "EXT3-fs: required extra inode space not"
++ "available.\n");
++ }
++
+ /*
+ * akpm: core read_super() calls in here with the superblock locked.
+ * That deadlocks, because orphan cleanup needs to lock the superblock
+Index: linux-stage/fs/ext3/xattr.c
+===================================================================
+--- linux-stage.orig/fs/ext3/xattr.c 2007-09-10 16:58:15.000000000 +0200
++++ linux-stage/fs/ext3/xattr.c 2007-09-10 17:05:30.000000000 +0200
+@@ -1015,7 +1015,7 @@
+ }
+ if (!error) {
+ ext3_xattr_update_super_block(handle, inode->i_sb);
+- inode->i_ctime = CURRENT_TIME_SEC;
++ inode->i_ctime = ext3_current_time(inode);
+ error = ext3_mark_iloc_dirty(handle, inode, &is.iloc);
+ /*
+ * The bh is consumed by ext3_mark_iloc_dirty, even with
+Index: linux-stage/include/linux/ext3_fs.h
+===================================================================
+--- linux-stage.orig/include/linux/ext3_fs.h 2007-09-10 17:04:21.000000000 +0200
++++ linux-stage/include/linux/ext3_fs.h 2007-09-10 17:05:30.000000000 +0200
+@@ -301,7 +301,7 @@
+ __le16 i_uid; /* Low 16 bits of Owner Uid */
+ __le32 i_size; /* Size in bytes */
+ __le32 i_atime; /* Access time */
+- __le32 i_ctime; /* Creation time */
++ __le32 i_ctime; /* Inode Change time */
+ __le32 i_mtime; /* Modification time */
+ __le32 i_dtime; /* Deletion Time */
+ __le16 i_gid; /* Low 16 bits of Group Id */
+@@ -350,10 +350,73 @@
+ } osd2; /* OS dependent 2 */
+ __le16 i_extra_isize;
+ __le16 i_pad1;
++ __le32 i_ctime_extra; /* extra Change time (nsec << 2 | epoch) */
++ __le32 i_mtime_extra; /* extra Modification time(nsec << 2 | epoch) */
++ __le32 i_atime_extra; /* extra Access time (nsec << 2 | epoch) */
++ __le32 i_crtime; /* File Creation time */
++ __le32 i_crtime_extra; /* extra File Creation time (nsec << 2 | epoch) */
+ };
+
+ #define i_size_high i_dir_acl
+
++#define EXT3_EPOCH_BITS 2
++#define EXT3_EPOCH_MASK ((1 << EXT3_EPOCH_BITS) - 1)
++#define EXT3_NSEC_MASK (~0UL << EXT3_EPOCH_BITS)
++
++#define EXT3_FITS_IN_INODE(ext3_inode, einode, field) \
++ ((offsetof(typeof(*ext3_inode), field) + \
++ sizeof((ext3_inode)->field)) \
++ <= (EXT3_GOOD_OLD_INODE_SIZE + \
++ (einode)->i_extra_isize)) \
++
++static inline __le32 ext3_encode_extra_time(struct timespec *time)
++{
++ return cpu_to_le32((sizeof(time->tv_sec) > 4 ?
++ time->tv_sec >> 32 : 0) |
++ ((time->tv_nsec << 2) & EXT3_NSEC_MASK));
++}
++
++static inline void ext3_decode_extra_time(struct timespec *time, __le32 extra) {
++ if (sizeof(time->tv_sec) > 4)
++ time->tv_sec |= (__u64)(le32_to_cpu(extra) & EXT3_EPOCH_MASK)
++ << 32;
++ time->tv_nsec = (le32_to_cpu(extra) & EXT3_NSEC_MASK) >> 2;
++}
++
++#define EXT3_INODE_SET_XTIME(xtime, inode, raw_inode) \
++do { \
++ (raw_inode)->xtime = cpu_to_le32((inode)->xtime.tv_sec); \
++ if (EXT3_FITS_IN_INODE(raw_inode, EXT3_I(inode), xtime ## _extra)) \
++ (raw_inode)->xtime ## _extra = \
++ ext3_encode_extra_time(&(inode)->xtime); \
++} while (0)
++
++#define EXT3_EINODE_SET_XTIME(xtime, einode, raw_inode)\
++do { \
++ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime)) \
++ (raw_inode)->xtime = cpu_to_le32((einode)->xtime.tv_sec); \
++ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime ## _extra)) \
++ (raw_inode)->xtime ## _extra = \
++ ext3_encode_extra_time(&(einode)->xtime); \
++} while (0)
++
++#define EXT3_INODE_GET_XTIME(xtime, inode, raw_inode) \
++do { \
++ (inode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime); \
++ if (EXT3_FITS_IN_INODE(raw_inode, EXT3_I(inode), xtime ## _extra)) \
++ ext3_decode_extra_time(&(inode)->xtime, \
++ raw_inode->xtime ## _extra); \
++} while (0)
++
++#define EXT3_EINODE_GET_XTIME(xtime, einode, raw_inode) \
++do { \
++ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime)) \
++ (einode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime); \
++ if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime ## _extra)) \
++ ext3_decode_extra_time(&(einode)->xtime, \
++ raw_inode->xtime ## _extra); \
++} while (0)
++
+ #if defined(__KERNEL__) || defined(__linux__)
+ #define i_reserved1 osd1.linux1.l_i_reserved1
+ #define i_frag osd2.linux2.l_i_frag
+@@ -534,11 +597,19 @@
+ __le32 s_last_orphan; /* start of list of inodes to delete */
+ __le32 s_hash_seed[4]; /* HTREE hash seed */
+ __u8 s_def_hash_version; /* Default hash version to use */
+- __u8 s_reserved_char_pad;
+- __u16 s_reserved_word_pad;
++ __u8 s_jnl_backup_type; /* Default type of journal backup */
++ __le16 s_desc_size; /* Group desc. size: INCOMPAT_64BIT */
+ __le32 s_default_mount_opts;
+- __le32 s_first_meta_bg; /* First metablock block group */
+- __u32 s_reserved[190]; /* Padding to the end of the block */
++ __le32 s_first_meta_bg; /* First metablock block group */
++ __le32 s_mkfs_time; /* When the filesystem was created */
++ __le32 s_jnl_blocks[17]; /* Backup of the journal inode */
++ __le32 s_blocks_count_hi; /* Blocks count high 32 bits */
++ __le32 s_r_blocks_count_hi; /* Reserved blocks count high 32 bits*/
++ __le32 s_free_blocks_count_hi; /* Free blocks count high 32 bits */
++ __le16 s_min_extra_isize; /* All inodes have at least # bytes */
++ __le16 s_want_extra_isize; /* New inodes should reserve # bytes */
++ __le32 s_flags; /* Miscellaneous flags */
++ __u32 s_reserved[167]; /* Padding to the end of the block */
+ };
+
+ #ifdef __KERNEL__
+@@ -553,6 +624,13 @@
+ return container_of(inode, struct ext3_inode_info, vfs_inode);
+ }
+
++static inline struct timespec ext3_current_time(struct inode *inode)
++{
++ return (inode->i_sb->s_time_gran < NSEC_PER_SEC) ?
++ current_fs_time(inode->i_sb) : CURRENT_TIME_SEC;
++}
++
++
+ static inline int ext3_valid_inum(struct super_block *sb, unsigned long ino)
+ {
+ return ino == EXT3_ROOT_INO ||
+@@ -624,6 +702,7 @@
+ #define EXT3_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
+ #define EXT3_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
+ #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010
++#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040
+
+ #define EXT3_FEATURE_INCOMPAT_COMPRESSION 0x0001
+ #define EXT3_FEATURE_INCOMPAT_FILETYPE 0x0002
+@@ -640,6 +719,7 @@
+ #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
+ EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \
++ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE| \
+ EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
+
+ /*
+Index: linux-stage/include/linux/ext3_fs_sb.h
+===================================================================
+--- linux-stage.orig/include/linux/ext3_fs_sb.h 2007-09-10 17:04:16.000000000 +0200
++++ linux-stage/include/linux/ext3_fs_sb.h 2007-09-10 17:05:30.000000000 +0200
+@@ -68,6 +68,9 @@
+ /* Last group used to allocate inode */
+ int s_last_alloc_group;
+
++ /* New inodes should reserve # bytes */
++ unsigned int s_want_extra_isize;
++
+ /* root of the per fs reservation window tree */
+ spinlock_t s_rsv_window_lock;
+ struct rb_root s_rsv_window_root;
+Index: linux-stage/include/linux/ext3_fs_i.h
+===================================================================
+--- linux-stage.orig/include/linux/ext3_fs_i.h 2007-09-10 17:04:19.000000000 +0200
++++ linux-stage/include/linux/ext3_fs_i.h 2007-09-10 17:05:30.000000000 +0200
+@@ -140,6 +140,8 @@
+ /* on-disk additional length */
+ __u16 i_extra_isize;
+
++ struct timespec i_crtime;
++
+ /*
+ * truncate_mutex is for serialising ext3_truncate() against
+ * ext3_getblock(). In the 2.4 ext2 design, great chunks of inode's
Modified: trunk/ldiskfs/kernel_patches/series/ldiskfs-2.6.23-vanilla.series
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/ldiskfs/kernel_patches/series/ldiskfs-2.6.23-vanilla.series?rev=310&op=diff
==============================================================================
--- trunk/ldiskfs/kernel_patches/series/ldiskfs-2.6.23-vanilla.series (original)
+++ trunk/ldiskfs/kernel_patches/series/ldiskfs-2.6.23-vanilla.series Fri Sep 14 15:17:09 2007
@@ -12,7 +12,7 @@
ext3-remove-cond_resched-calls-2.6.12.patch
ext3-filterdata-2.6.20.patch
ext3-uninit-2.6.20.patch
-ext3-nanosecond-2.6.22-vanilla.patch
+ext3-nanosecond-2.6.23-vanilla.patch
ext3-inode-version-2.6.18-vanilla.patch
ext3-mmp-2.6.20-vanilla.patch
bug12861.patch
More information about the Pkg-lustre-svn-commit
mailing list