From 5e610513fd1a6928fa5519da2e4e782eb26c405c Mon Sep 17 00:00:00 2001 From: wangdi <wangdi> Date: Tue, 6 Jul 2004 15:07:31 +0000 Subject: [PATCH] some minor fix for snapfs 1) add IOC_OBD_SNAP_ADD 3) mirror s_flags in sb for P_DIROPS --- lustre/include/linux/lustre_lib.h | 3 +++ lustre/include/linux/lustre_smfs.h | 1 + lustre/lvfs/fsfilt_smfs.c | 3 +++ lustre/utils/obdctl.h | 1 + 4 files changed, 8 insertions(+) diff --git a/lustre/include/linux/lustre_lib.h b/lustre/include/linux/lustre_lib.h index 968a310803..f354ecb6d5 100644 --- a/lustre/include/linux/lustre_lib.h +++ b/lustre/include/linux/lustre_lib.h @@ -471,6 +471,9 @@ static inline void obd_ioctl_freedata(char *buf, int len) #define OBD_IOC_COBD_CON _IOWR('f', 220, long) #define OBD_IOC_COBD_COFF _IOWR('f', 221, long) #define OBD_IOC_COBD_CFLUSH _IOWR('f', 222, long) + +#define OBD_IOC_SNAP_ADD _IOWR('f', 230, long) + /* XXX _IOWR('f', 250, long) has been defined in * portals/include/linux/kp30.h for debug, don't use it */ diff --git a/lustre/include/linux/lustre_smfs.h b/lustre/include/linux/lustre_smfs.h index 68cf9e2133..77949c7616 100644 --- a/lustre/include/linux/lustre_smfs.h +++ b/lustre/include/linux/lustre_smfs.h @@ -339,6 +339,7 @@ static inline void duplicate_sb(struct super_block *dst_sb, dst_sb->s_magic = src_sb->s_magic; dst_sb->s_blocksize_bits = src_sb->s_blocksize_bits; dst_sb->s_maxbytes = src_sb->s_maxbytes; + dst_sb->s_flags = src_sb->s_flags; } static inline void d_unalloc(struct dentry *dentry) diff --git a/lustre/lvfs/fsfilt_smfs.c b/lustre/lvfs/fsfilt_smfs.c index f3f46752c8..98f138321e 100644 --- a/lustre/lvfs/fsfilt_smfs.c +++ b/lustre/lvfs/fsfilt_smfs.c @@ -675,6 +675,9 @@ static int fsfilt_smfs_setup(struct obd_device *obd, struct super_block *sb) csb = S2CSB(sb); if (cache_fsfilt->fs_setup) rc = cache_fsfilt->fs_setup(obd, csb); + + duplicate_sb(sb, csb); + RETURN(rc); } diff --git a/lustre/utils/obdctl.h b/lustre/utils/obdctl.h index 31ed6d8682..3004651093 100644 --- a/lustre/utils/obdctl.h +++ b/lustre/utils/obdctl.h @@ -90,6 +90,7 @@ int jt_llog_check(int argc, char **argv); int jt_obd_reint_sync(int argc, char **argv); int jt_obd_cache_on(int argc, char **argv); int jt_obd_cache_off(int argc, char **argv); +int jt_obd_snap_add(int argc, char **argv); int lcfg_ioctl(char * func, int dev_id, struct lustre_cfg *lcfg); int parse_devname(char *func, char *name); -- GitLab