Skip to contentSkip to conversation

staging/lustre: Intel tree sync and two fixups

PATCH In review Peng Tao 2 participants 6 messages Jul 24, 2013 – Jul 25, 2013 Staging

lore
Share & tools
lore

Peng Tao

author
#0 lore raw

cover staging/lustre: Intel tree sync and two fixups

Hi Greg,

Following are the rest of previous patchset rebased on latest staging-next and reordered to avoid breaking bisecability. Please help to queue them.

[Resend again to fix up patch authorship of my own. Sorry for the noise...]

Thanks,
Tao

Liu Xuezhao (1):
staging/lustre/obdclass: add obd_target.h

Peng Tao (2):
staging/lustre: fix build on non-x86
staging/lustre: fix Kconfig bool defaults

 drivers/staging/lustre/lustre/Kconfig              |    2 +-
 .../lustre/lustre/include/linux/lustre_fsfilt.h    |   10 -
 .../staging/lustre/lustre/include/lprocfs_status.h |   36 --
 drivers/staging/lustre/lustre/include/obd.h        |  140 +----
 drivers/staging/lustre/lustre/lvfs/lvfs_linux.c    |    1 -
 drivers/staging/lustre/lustre/obdclass/Makefile    |    2 +-
 .../lustre/lustre/obdclass/lprocfs_jobstats.c      |  560 --------------------
 drivers/staging/lustre/lustre/obdclass/obd_mount.c |    1 -
 drivers/staging/lustre/lustre/ptlrpc/Makefile      |    2 +-
 drivers/staging/lustre/lustre/ptlrpc/errno.c       |    4 +-
 10 files changed, 6 insertions(+), 752 deletions(-)
 delete mode 100644 drivers/staging/lustre/lustre/obdclass/lprocfs_jobstats.c
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 1/3 staging/lustre/obdclass: add obd_target.h

From: Liu Xuezhao <[email protected]>

Move some server-side data structures form obd.h to obd_target.h. To remove some code dependencies use HAVE_SERVER_SUPPORT to protect some llog/fsfilt_* functions.

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1330
Lustre-change: http://review.whamcloud.com/2678

---
 .../lustre/lustre/include/linux/lustre_fsfilt.h    |   10 -
 .../staging/lustre/lustre/include/lprocfs_status.h |   36 --
 drivers/staging/lustre/lustre/include/obd.h        |  140 +----
 drivers/staging/lustre/lustre/lvfs/lvfs_linux.c    |    1 -
 drivers/staging/lustre/lustre/obdclass/Makefile    |    2 +-
 .../lustre/lustre/obdclass/lprocfs_jobstats.c      |  560 --------------------
 drivers/staging/lustre/lustre/obdclass/obd_mount.c |    1 -
 7 files changed, 3 insertions(+), 747 deletions(-)
 delete mode 100644 drivers/staging/lustre/lustre/obdclass/lprocfs_jobstats.c
drivers/staging/lustre/lustre/include/linux/lustre_fsfilt.h +0 -10
index 6c72609..e637006 100644
@@ -145,16 +145,6 @@ static inline int fsfilt_commit(struct obd_device *obd, struct inode *inode,
 	return rc;
 }
 
-static inline int fsfilt_map_inode_pages(struct obd_device *obd,
-					 struct inode *inode,
-					 struct page **page, int pages,
-					 unsigned long *blocks,
-					 int create, struct mutex *mutex)
-{
-	return obd->obd_fsops->fs_map_inode_pages(inode, page, pages, blocks,
-						  create, mutex);
-}
-
 static inline int fsfilt_read_record(struct obd_device *obd, struct file *file,
 				     void *buf, loff_t size, loff_t *offs)
 {
drivers/staging/lustre/lustre/include/lprocfs_status.h +0 -36
index 7a05364..d7f1be9 100644
@@ -370,18 +370,6 @@ static inline void s2dhms(struct dhms *ts, time_t secs)
 #define JOBSTATS_DISABLE		"disable"
 #define JOBSTATS_PROCNAME_UID		"procname_uid"
 
-typedef void (*cntr_init_callback)(struct lprocfs_stats *stats);
-
-struct obd_job_stats {
-	cfs_hash_t	*ojs_hash;
-	struct list_head	 ojs_list;
-	rwlock_t       ojs_lock; /* protect the obj_list */
-	cntr_init_callback ojs_cntr_init_fn;
-	int		ojs_cntr_num;
-	int		ojs_cleanup_interval;
-	time_t		   ojs_last_cleanup;
-};
-
 #ifdef LPROCFS
 
 extern int lprocfs_stats_alloc_one(struct lprocfs_stats *stats,
@@ -748,16 +736,6 @@ struct file_operations name##_fops = {				     \
 		.release = lprocfs_single_release,			\
 	};
 
-/* lprocfs_jobstats.c */
-int lprocfs_job_stats_log(struct obd_device *obd, char *jobid,
-			  int event, long amount);
-void lprocfs_job_stats_fini(struct obd_device *obd);
-int lprocfs_job_stats_init(struct obd_device *obd, int cntr_num,
-			   cntr_init_callback fn);
-int lprocfs_rd_job_interval(struct seq_file *m, void *data);
-int lprocfs_wr_job_interval(struct file *file, const char *buffer,
-			    unsigned long count, void *data);
-
 /* lproc_ptlrpc.c */
 struct ptlrpc_request;
 extern void target_print_req(void *seq_file, struct ptlrpc_request *req);
@@ -1018,20 +996,6 @@ __u64 lprocfs_stats_collector(struct lprocfs_stats *stats, int idx,
 #define LPROC_SEQ_FOPS_RW_TYPE(name, type)
 #define LPROC_SEQ_FOPS_WR_ONLY(name, type)
 
-/* lprocfs_jobstats.c */
-static inline
-int lprocfs_job_stats_log(struct obd_device *obd, char *jobid, int event,
-			  long amount)
-{ return 0; }
-static inline
-void lprocfs_job_stats_fini(struct obd_device *obd)
-{ return; }
-static inline
-int lprocfs_job_stats_init(struct obd_device *obd, int cntr_num,
-			   cntr_init_callback fn)
-{ return 0; }
-
-
 /* lproc_ptlrpc.c */
 #define target_print_req NULL
 
drivers/staging/lustre/lustre/include/obd.h +2 -138

178 lines not on this page · raw message

drivers/staging/lustre/lustre/lvfs/lvfs_linux.c +0 -1
index 80b841a..9d19d0a 100644
@@ -46,7 +46,6 @@
 #include <linux/pagemap.h>
 #include <linux/quotaops.h>
 #include <linux/libcfs/libcfs.h>
-#include <lustre_fsfilt.h>
 #include <obd.h>
 #include <linux/module.h>
 #include <linux/init.h>
drivers/staging/lustre/lustre/obdclass/Makefile +1 -1
index b80c13c..8a0e08c 100644
@@ -3,7 +3,7 @@ obj-$(CONFIG_LUSTRE_FS) += obdclass.o llog_test.o
 obdclass-y := linux/linux-module.o linux/linux-obdo.o linux/linux-sysctl.o \
 	      llog.o llog_cat.o llog_obd.o llog_swab.o class_obd.o debug.o \
 	      genops.o uuid.o llog_ioctl.o lprocfs_status.o		   \
-	      lprocfs_jobstats.o lustre_handles.o lustre_peer.o llog_osd.o \
+	      lustre_handles.o lustre_peer.o llog_osd.o \
 	      local_storage.o statfs_pack.o obdo.o obd_config.o obd_mount.o\
 	      mea.o lu_object.o dt_object.o capa.o cl_object.o   \
 	      cl_page.o cl_lock.o cl_io.o lu_ref.o acl.o idmap.o	   \
drivers/staging/lustre/lustre/obdclass/lprocfs_jobstats.c deleted +0 -560

560 lines not on this page · raw message

drivers/staging/lustre/lustre/obdclass/obd_mount.c +0 -1
index 28d174a..533a493 100644
@@ -47,7 +47,6 @@
 
 #include <obd.h>
 #include <lvfs.h>
-#include <lustre_fsfilt.h>
 #include <obd_class.h>
 #include <lustre/lustre_user.h>
 #include <lustre_log.h>
Signature · 1 line
1.7.9.5
author
#2 lore raw

PATCH 2/3 staging/lustre: fix build on non-x86

In reply to Peng Tao

From: Peng Tao <[email protected]>

On non-x86 we will build with Lustre's errno translate code but it has a few issues.

Cc Andreas Dilger <[email protected]>
---
 drivers/staging/lustre/lustre/ptlrpc/Makefile |    2 +-
 drivers/staging/lustre/lustre/ptlrpc/errno.c  |    4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/staging/lustre/lustre/ptlrpc/Makefile +1 -1
index a379558..6d78b80 100644
@@ -16,7 +16,7 @@ ptlrpc_objs += sec.o sec_bulk.o sec_gc.o sec_config.o sec_lproc.o
 ptlrpc_objs += sec_null.o sec_plain.o nrs.o nrs_fifo.o
 
 ptlrpc-y := $(ldlm_objs) $(ptlrpc_objs)
-ptlrpc-$(CONFIG_LUSTRE_TRANSLATE_ERRNOS) += errno.c
+ptlrpc-$(CONFIG_LUSTRE_TRANSLATE_ERRNOS) += errno.o
 
 obj-$(CONFIG_PTLRPC_GSS) += gss/
 
drivers/staging/lustre/lustre/ptlrpc/errno.c +1 -3
index 46e259e..1c10063 100644
@@ -25,7 +25,7 @@
  * Copyright (c) 2013, Intel Corporation.
  */
 
-#include <libcfs/libcfs.h>
+#include <linux/libcfs/libcfs.h>
 #include <lustre/lustre_errno.h>
 
 /*
@@ -184,7 +184,6 @@ static int lustre_errno_hton_mapping[] = {
 	[EBADTYPE]		= LUSTRE_EBADTYPE,
 	[EJUKEBOX]		= LUSTRE_EJUKEBOX,
 	[EIOCBQUEUED]		= LUSTRE_EIOCBQUEUED,
-	[EIOCBRETRY]		= LUSTRE_EIOCBRETRY
 };
 
 static int lustre_errno_ntoh_mapping[] = {
@@ -331,7 +330,6 @@ static int lustre_errno_ntoh_mapping[] = {
 	[LUSTRE_EBADTYPE]		= EBADTYPE,
 	[LUSTRE_EJUKEBOX]		= EJUKEBOX,
 	[LUSTRE_EIOCBQUEUED]		= EIOCBQUEUED,
-	[LUSTRE_EIOCBRETRY]		= EIOCBRETRY
 };
 
 unsigned int lustre_errno_hton(unsigned int h)
Signature · 1 line
1.7.9.5
author
#3 lore raw

PATCH 3/3 staging/lustre: fix Kconfig bool defaults

In reply to Peng Tao

From: Peng Tao <[email protected]>

Should be y instead of true.

---
 drivers/staging/lustre/lustre/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/Kconfig +1 -1
index 9ae7fa8..e3b3c74 100644
@@ -52,4 +52,4 @@ config LUSTRE_DEBUG_EXPENSIVE_CHECK
 config LUSTRE_TRANSLATE_ERRNOS
 	bool
 	depends on LUSTRE_FS && !X86
-	default true
+	default y
Signature · 1 line
1.7.9.5
#4 lore raw

Re: [PATCH-RESEND 3/3] staging/lustre: fix Kconfig bool defaults

Quoted 16 lines · Peng Tao

From: Peng Tao <[email protected]>

Should be y instead of true.

---
 drivers/staging/lustre/lustre/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/Kconfig +0 -0
index 9ae7fa8..e3b3c74 100644

drivers/staging/lustre/lustre/Kconfig config LUSTRE_DEBUG_EXPENSIVE_CHECK · line 55

Quoted 5 lines
drivers/staging/lustre/lustre/Kconfig +1 -1
@@ -52,4 +52,4 @@ config LUSTRE_DEBUG_EXPENSIVE_CHECK
 config LUSTRE_TRANSLATE_ERRNOS
 	bool
 	depends on LUSTRE_FS && !X86
-	default true
+	default y

Why is the default for this going to be 'y'? That should only be for things that keep the machine from booting.

If this is something you always want to do, then why make it an option at all?

Given that there is no documentation for what this option is, and why people should always turn it on, I can't accept this patch, sorry.

greg k-h

author
#5 lore raw

Re: [PATCH-RESEND 3/3] staging/lustre: fix Kconfig bool defaults

Quoted 26 lines · Greg Kroah-Hartman
Quoted 16 lines · Peng Tao

From: Peng Tao <[email protected]>

Should be y instead of true.

---
 drivers/staging/lustre/lustre/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/Kconfig +0 -0
index 9ae7fa8..e3b3c74 100644

drivers/staging/lustre/lustre/Kconfig config LUSTRE_DEBUG_EXPENSIVE_CHECK · line 55

Quoted 5 lines
drivers/staging/lustre/lustre/Kconfig +1 -1
@@ -52,4 +52,4 @@ config LUSTRE_DEBUG_EXPENSIVE_CHECK
 config LUSTRE_TRANSLATE_ERRNOS
      bool
      depends on LUSTRE_FS && !X86
-     default true
+     default y

Why is the default for this going to be 'y'? That should only be for things that keep the machine from booting.

Quoted 6 lines

If this is something you always want to do, then why make it an option at all?

Given that there is no documentation for what this option is, and why people should always turn it on, I can't accept this patch, sorry.

I was hoping to use the config option to control over whether the translation code need to be compiled. After checking other Makefiles, I found that I can just use ifeq clause in Makefile to do it. So this config option can be deleted. I will send updated patch.

Thanks,
Tao