From 9438e271b3b698bc02a51fe9cd7aceef4e51bb85 Mon Sep 17 00:00:00 2001 From: phil Date: Tue, 29 Mar 2005 04:34:02 +0000 Subject: [PATCH] b=4952 A plurality of Makefiles led me astray; super.c isn't compiled into 2.6 builds at all, so lustre_remount_fs needs to be in llite_lib.c --- lustre/llite/llite_internal.h | 4 +--- lustre/llite/llite_lib.c | 19 +++++++++++++++++++ lustre/llite/super.c | 19 ------------------- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h index 25fcec0..50c6d11 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h @@ -327,6 +327,7 @@ void ll_read_inode2(struct inode *inode, void *opaque); int ll_iocontrol(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); void ll_umount_begin(struct super_block *sb); +int lustre_remount_fs(struct super_block *sb, int *flags, char *data); int ll_prep_inode(struct obd_export *exp, struct inode **inode, struct ptlrpc_request *req, int offset, struct super_block *); void lustre_dump_dentry(struct dentry *, int recur); @@ -369,9 +370,6 @@ void ll_queue_done_writing(struct inode *inode); void ll_close_thread_shutdown(struct ll_close_queue *lcq); int ll_close_thread_start(struct ll_close_queue **lcq_ret); -/* llite/super.c */ -int lustre_remount_fs(struct super_block *sb, int *flags, char *data); - /* llite/llite_mmap.c */ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) typedef struct rb_root rb_root_t; diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 095d8ea..697e2f8 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -1503,6 +1503,25 @@ void ll_umount_begin(struct super_block *sb) EXIT; } +int lustre_remount_fs(struct super_block *sb, int *flags, char *data) +{ + struct ll_sb_info *sbi = ll_s2sbi(sb); + int err; + __u32 read_only; + + if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) { + read_only = *flags & MS_RDONLY; + err = obd_set_info(sbi->ll_mdc_exp, strlen("read-only"), + "read-only", sizeof(read_only), &read_only); + if (err) { + CERROR("Failed to change the read-only flag during " + "remount: %d\n", err); + return err; + } + } + return 0; +} + int ll_prep_inode(struct obd_export *exp, struct inode **inode, struct ptlrpc_request *req, int offset,struct super_block *sb) { diff --git a/lustre/llite/super.c b/lustre/llite/super.c index 80d555a..78f9206 100644 --- a/lustre/llite/super.c +++ b/lustre/llite/super.c @@ -62,25 +62,6 @@ static struct super_block *lustre_read_super(struct super_block *sb, RETURN(sb); } -int lustre_remount_fs(struct super_block *sb, int *flags, char *data) -{ - struct ll_sb_info *sbi = ll_s2sbi(sb); - int err; - __u32 read_only; - - if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) { - read_only = *flags & MS_RDONLY; - err = obd_set_info(sbi->ll_mdc_exp, strlen("read-only"), - "read-only", sizeof(read_only), &read_only); - if (err) { - CERROR("Failed to change the read-only flag during " - "remount: %d\n", err); - return err; - } - } - return 0; -} - static struct file_system_type lustre_lite_fs_type = { .owner = THIS_MODULE, .name = "lustre_lite", -- 1.8.3.1