mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiong Zhou <jencce.kernel@gmail.com>
To: Peng Tao <bergwolf@gmail.com>
Cc: Xiong Zhou <jencce.kernel@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andreas Dilger <andreas.dilger@intel.com>,
	Paul Bolle <pebolle@tiscali.nl>, Jiri Kosina <trivial@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>
Subject: Re: [PATCH v2] staging/lustre: lloop depends on BLOCK
Date: Wed, 31 Jul 2013 10:30:41 +0800 (CST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1307311028001.25194@M2420> (raw)
In-Reply-To: <CA+a=Yy4FAOhKkwgzuCj-rtd9rE2jc8WOf=E8OMQ=o=JUrGgW1w@mail.gmail.com>



On Tue, 30 Jul 2013, Peng Tao wrote:

> On Tue, Jul 30, 2013 at 8:29 AM, Xiong Zhou <jencce.kernel@gmail.com> wrote:
> > From: Xiong Zhou <jencce.kernel@gmail.com>
> >
> > In the lustre client driver, lloop depends on BLOCK. Add an
> > option for this dependence. Last version of this patch makes
> > LUSTRE_FS depends on BLOCK.
> > Remove unnecessary jdb head files which depends on BLOCK.
> >
> Thanks for the patch. One minor comment below. Other than that, you can add
> Reviewed-by: Peng Tao <tao.peng@emc.com>
> 
> > Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com>
> > ---
> >  drivers/staging/lustre/lustre/Kconfig              |    7 ++++++-
> >  drivers/staging/lustre/lustre/fld/fld_cache.c      |    1 -
> >  drivers/staging/lustre/lustre/fld/fld_request.c    |    1 -
> >  .../lustre/lustre/include/linux/lustre_compat25.h  |    2 ++
> >  drivers/staging/lustre/lustre/llite/Makefile       |    2 +-
> >  drivers/staging/lustre/lustre/lvfs/fsfilt.c        |    1 -
> >  6 files changed, 9 insertions(+), 5 deletions(-)
> >
> >  #define TREE_READ_UNLOCK_IRQ(mapping)  spin_unlock_irq(&(mapping)->tree_lock)
> >
> > +#ifdef CONFIG_BLOCK
> >  static inline
> >  int ll_unregister_blkdev(unsigned int dev, const char *name)
> It is better to remove the wrapper and just call unregister_blkdev in
> lloop.c. The wrapper exists to support old kernels in Lustre master
> but doesn't make sense in upstream kernel.
> 
> Thanks,
> Tao
> 

Good comment, Thanks for the review.



From: Xiong Zhou <jencce.kernel@gmail.com>

First version of this patch makes LUSTRE_FS depends on BLOCK.
Second version makes only lloop depends on BLOCK with a config
option for this dependence, and remove unnecessary jdb header
files which depends on BLOCK.
This version removes the wrapper ll_unregister_blkdev which 
depends on BLOCK in header and just call unregister_blkdev in 
lloop.c based on Peng Tao's comment.

Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com>
Reviewed-by: Peng Tao <tao.peng@emc.com>
---
 drivers/staging/lustre/lustre/Kconfig              |    7 ++++++-
 drivers/staging/lustre/lustre/fld/fld_cache.c      |    1 -
 drivers/staging/lustre/lustre/fld/fld_request.c    |    1 -
 .../lustre/lustre/include/linux/lustre_compat25.h  |    7 -------
 drivers/staging/lustre/lustre/llite/Makefile       |    2 +-
 drivers/staging/lustre/lustre/llite/lloop.c        |    6 ++----
 drivers/staging/lustre/lustre/lvfs/fsfilt.c        |    1 -
 7 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/lustre/lustre/Kconfig b/drivers/staging/lustre/lustre/Kconfig
index 0b45de0..4e898e4 100644
--- a/drivers/staging/lustre/lustre/Kconfig
+++ b/drivers/staging/lustre/lustre/Kconfig
@@ -1,6 +1,6 @@
 config LUSTRE_FS
 	tristate "Lustre file system client support"
-	depends on STAGING && INET && BLOCK && m
+	depends on INET && m
 	select LNET
 	select CRYPTO
 	select CRYPTO_CRC32
@@ -53,3 +53,8 @@ config LUSTRE_TRANSLATE_ERRNOS
 	bool
 	depends on LUSTRE_FS && !X86
 	default true
+
+config LUSTRE_LLITE_LLOOP
+	bool "Lustre virtual block device"
+	depends on LUSTRE_FS && BLOCK
+	default m
diff --git a/drivers/staging/lustre/lustre/fld/fld_cache.c b/drivers/staging/lustre/lustre/fld/fld_cache.c
index 347f2ae..8410107 100644
--- a/drivers/staging/lustre/lustre/fld/fld_cache.c
+++ b/drivers/staging/lustre/lustre/fld/fld_cache.c
@@ -45,7 +45,6 @@
 
 # include <linux/libcfs/libcfs.h>
 # include <linux/module.h>
-# include <linux/jbd.h>
 # include <asm/div64.h>
 
 #include <obd.h>
diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c b/drivers/staging/lustre/lustre/fld/fld_request.c
index c99b945..049322a 100644
--- a/drivers/staging/lustre/lustre/fld/fld_request.c
+++ b/drivers/staging/lustre/lustre/fld/fld_request.c
@@ -44,7 +44,6 @@
 
 # include <linux/libcfs/libcfs.h>
 # include <linux/module.h>
-# include <linux/jbd.h>
 # include <asm/div64.h>
 
 #include <obd.h>
diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
index 426533b..018e604 100644
--- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
+++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
@@ -111,13 +111,6 @@ static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt,
 #define TREE_READ_LOCK_IRQ(mapping)	spin_lock_irq(&(mapping)->tree_lock)
 #define TREE_READ_UNLOCK_IRQ(mapping)	spin_unlock_irq(&(mapping)->tree_lock)
 
-static inline
-int ll_unregister_blkdev(unsigned int dev, const char *name)
-{
-	unregister_blkdev(dev, name);
-	return 0;
-}
-
 #define ll_invalidate_bdev(a,b)	 invalidate_bdev((a))
 
 #ifndef FS_HAS_FIEMAP
diff --git a/drivers/staging/lustre/lustre/llite/Makefile b/drivers/staging/lustre/lustre/llite/Makefile
index dff0c04..f493e07 100644
--- a/drivers/staging/lustre/lustre/llite/Makefile
+++ b/drivers/staging/lustre/lustre/llite/Makefile
@@ -1,5 +1,5 @@
 obj-$(CONFIG_LUSTRE_FS) += lustre.o
-obj-$(CONFIG_LUSTRE_FS) += llite_lloop.o
+obj-$(CONFIG_LUSTRE_LLITE_LLOOP) += llite_lloop.o
 lustre-y := dcache.o dir.o file.o llite_close.o llite_lib.o llite_nfs.o \
 	    rw.o lproc_llite.o namei.o symlink.o llite_mmap.o \
 	    xattr.o remote_perm.o llite_rmtacl.o llite_capa.o \
diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c
index e063efc..ae3dc9d 100644
--- a/drivers/staging/lustre/lustre/llite/lloop.c
+++ b/drivers/staging/lustre/lustre/llite/lloop.c
@@ -848,10 +848,8 @@ static void lloop_exit(void)
 		blk_cleanup_queue(loop_dev[i].lo_queue);
 		put_disk(disks[i]);
 	}
-	if (ll_unregister_blkdev(lloop_major, "lloop"))
-		CWARN("lloop: cannot unregister blkdev\n");
-	else
-		CDEBUG(D_CONFIG, "unregistered lloop major %d\n", lloop_major);
+
+	unregister_blkdev(lloop_major, "lloop");
 
 	OBD_FREE(disks, max_loop * sizeof(*disks));
 	OBD_FREE(loop_dev, max_loop * sizeof(*loop_dev));
diff --git a/drivers/staging/lustre/lustre/lvfs/fsfilt.c b/drivers/staging/lustre/lustre/lvfs/fsfilt.c
index 064445c..ce71f80 100644
--- a/drivers/staging/lustre/lustre/lvfs/fsfilt.c
+++ b/drivers/staging/lustre/lustre/lvfs/fsfilt.c
@@ -35,7 +35,6 @@
 #define DEBUG_SUBSYSTEM S_FILTER
 
 #include <linux/fs.h>
-#include <linux/jbd.h>

  reply	other threads:[~2013-07-31  2:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-30  0:29 Xiong Zhou
2013-07-30  7:44 ` Peng Tao
2013-07-31  2:30   ` Xiong Zhou [this message]
2013-08-01  0:41     ` Greg Kroah-Hartman
2013-08-02  2:20       ` Xiong Zhou
2013-08-02  3:11         ` Greg Kroah-Hartman
2013-08-01  8:45 ` Christoph Hellwig
2013-08-01 19:57   ` Dilger, Andreas
2013-08-02 10:49     ` Christoph Hellwig
2013-08-07  7:45       ` Dilger, Andreas
2013-08-08 12:17         ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.02.1307311028001.25194@M2420 \
    --to=jencce.kernel@gmail.com \
    --cc=andreas.dilger@intel.com \
    --cc=bergwolf@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pebolle@tiscali.nl \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®