From: yury Date: Mon, 16 May 2005 08:04:51 +0000 (+0000) Subject: - fixed umounting all GNS entrie son lustre umount (added umount_lustre patch) X-Git-Tag: v1_7_100~1326 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=ece176dd14b40561852b3627e99903389bcac96a - fixed umounting all GNS entrie son lustre umount (added umount_lustre patch) - some typos fixed. --- diff --git a/lustre/kernel_patches/patches/vfs-umount_lustre-vanilla-2.6.10-fc3.patch b/lustre/kernel_patches/patches/vfs-umount_lustre-vanilla-2.6.10-fc3.patch new file mode 100644 index 0000000..9f79e0b --- /dev/null +++ b/lustre/kernel_patches/patches/vfs-umount_lustre-vanilla-2.6.10-fc3.patch @@ -0,0 +1,23 @@ +diff -rupN linux-2.6.10.orig/fs/namespace.c linux-2.6.10/fs/namespace.c +--- linux-2.6.10.orig/fs/namespace.c 2005-05-16 10:46:42.000000000 +0300 ++++ linux-2.6.10/fs/namespace.c 2005-05-16 10:31:53.000000000 +0300 +@@ -407,6 +407,8 @@ int do_umount(struct vfsmount *mnt, int + */ + + lock_kernel(); ++ if (sb->s_op->umount_lustre) ++ sb->s_op->umount_lustre(sb); + if( (flags&MNT_FORCE) && sb->s_op->umount_begin) + sb->s_op->umount_begin(sb); + unlock_kernel(); +diff -rupN linux-2.6.10.orig/include/linux/fs.h linux-2.6.10/include/linux/fs.h +--- linux-2.6.10.orig/include/linux/fs.h 2005-05-16 10:47:02.000000000 +0300 ++++ linux-2.6.10/include/linux/fs.h 2005-05-16 10:32:50.000000000 +0300 +@@ -997,6 +997,7 @@ struct super_operations { + int (*remount_fs) (struct super_block *, int *, char *); + void (*clear_inode) (struct inode *); + void (*umount_begin) (struct super_block *); ++ void (*umount_lustre) (struct super_block *); + + int (*show_options)(struct seq_file *, struct vfsmount *); + }; diff --git a/lustre/kernel_patches/series/2.6-fc3-uml.series b/lustre/kernel_patches/series/2.6-fc3-uml.series index 295c4a8..7033c62 100644 --- a/lustre/kernel_patches/series/2.6-fc3-uml.series +++ b/lustre/kernel_patches/series/2.6-fc3-uml.series @@ -23,3 +23,4 @@ vfs_lookup_in_file-2.6.patch jbd-2.6.10-jcberr.patch hostfs_readdir_large.patch vfs-intent_release_umount-vanilla-2.6.10-fc3.patch +vfs-umount_lustre-vanilla-2.6.10-fc3.patch diff --git a/lustre/kernel_patches/series/2.6-fc3.series b/lustre/kernel_patches/series/2.6-fc3.series index 3e2783e..5b2fd7c 100644 --- a/lustre/kernel_patches/series/2.6-fc3.series +++ b/lustre/kernel_patches/series/2.6-fc3.series @@ -25,3 +25,4 @@ hostfs_readdir_large.patch linux-2.6.10-fc3-left.patch linux-2.6.10-fc3-lkcd.patch vfs-intent_release_umount-vanilla-2.6.10-fc3.patch +vfs-umount_lustre-vanilla-2.6.10-fc3.patch diff --git a/lustre/llite/super.c b/lustre/llite/super.c index f267dfc..0c0c7bc 100644 --- a/lustre/llite/super.c +++ b/lustre/llite/super.c @@ -64,7 +64,7 @@ static struct super_block *lustre_read_super(struct super_block *sb, static void ll_umount_lustre(struct super_block *sb) { struct ll_sb_info *sbi = ll_s2sbi(sb); - ll_gns_check_all(sbi, LL_GNS_UMOUNT); + ll_gns_check_mounts(sbi, LL_GNS_UMOUNT); } static struct file_system_type lustre_lite_fs_type = { diff --git a/lustre/llite/super25.c b/lustre/llite/super25.c index 8ff81e9..b5557f1 100644 --- a/lustre/llite/super25.c +++ b/lustre/llite/super25.c @@ -98,6 +98,12 @@ void ll_destroy_inodecache(void) "ll_inode_cache: not all structures were freed\n"); } +static void ll_umount_lustre(struct super_block *sb) +{ + struct ll_sb_info *sbi = ll_s2sbi(sb); + ll_gns_check_mounts(sbi, LL_GNS_UMOUNT); +} + /* exported operations */ struct super_operations lustre_super_operations = { @@ -106,7 +112,8 @@ struct super_operations lustre_super_operations = .clear_inode = ll_clear_inode, .put_super = lustre_put_super, .statfs = ll_statfs, - .umount_begin = ll_umount_begin + .umount_begin = ll_umount_begin, + .umount_lustre = ll_umount_lustre }; struct file_system_type lustre_lite_fs_type = { @@ -144,9 +151,9 @@ static int __init init_lustre_lite(void) goto out; } ll_intent_slab = kmem_cache_create("lustre_intent_data", - sizeof(struct lustre_intent_data), - 0, SLAB_HWCACHE_ALIGN, NULL, - NULL); + sizeof(struct lustre_intent_data), + 0, SLAB_HWCACHE_ALIGN, NULL, + NULL); if (ll_intent_slab == NULL) { kmem_cache_destroy(ll_file_data_slab); ll_destroy_inodecache();