linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] lustre/fld: remove fld_thread_key
@ 2013-10-21 15:18 Peng Tao
  2013-10-21 15:18 ` [PATCH 2/4] staging/lustre/llite: fix mkdir endless loop Peng Tao
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Peng Tao @ 2013-10-21 15:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Peng Tao, Andreas Dilger

It is left over when porting Lustre tree patch in commit (e62e5d92) and should be
removed.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
---
 drivers/staging/lustre/lustre/fld/fld_request.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c b/drivers/staging/lustre/lustre/fld/fld_request.c
index 078e98b..e47fd50 100644
--- a/drivers/staging/lustre/lustre/fld/fld_request.c
+++ b/drivers/staging/lustre/lustre/fld/fld_request.c
@@ -59,8 +59,6 @@
 #include <lustre_mdc.h>
 #include "fld_internal.h"
 
-struct lu_context_key fld_thread_key;
-
 /* TODO: these 3 functions are copies of flow-control code from mdc_lib.c
  * It should be common thing. The same about mdc RPC lock */
 static int fld_req_avail(struct client_obd *cli, struct mdc_cache_waiter *mcw)
@@ -509,14 +507,11 @@ static int __init fld_mod_init(void)
 	if (IS_ERR(fld_type_proc_dir))
 		return PTR_ERR(fld_type_proc_dir);
 
-	LU_CONTEXT_KEY_INIT(&fld_thread_key);
-	lu_context_key_register(&fld_thread_key);
 	return 0;
 }
 
 static void __exit fld_mod_exit(void)
 {
-	lu_context_key_degister(&fld_thread_key);
 	if (fld_type_proc_dir != NULL && !IS_ERR(fld_type_proc_dir)) {
 		lprocfs_remove(&fld_type_proc_dir);
 		fld_type_proc_dir = NULL;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/4] staging/lustre/llite: fix mkdir endless loop
  2013-10-21 15:18 [PATCH 1/4] lustre/fld: remove fld_thread_key Peng Tao
@ 2013-10-21 15:18 ` Peng Tao
  2013-10-21 15:18 ` [PATCH 3/4] staging/lustre: fix tv_usec build warning on parisc Peng Tao
  2013-10-21 15:18 ` [PATCH 4/4] staging/lustre: fix coccinelle warnings Peng Tao
  2 siblings, 0 replies; 5+ messages in thread
From: Peng Tao @ 2013-10-21 15:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Peng Tao, Andreas Dilger

Running on 3.11-rc4 kernel, I got below endless loop. It turns to be that Lustre
always saves the first page of a dir inode mapping at index ~0UL.  And after
commit 5a720394 (mm: teach truncate_inode_pages_range() to handle non page
aligned ranges), truncate_inode_pages_range() _NO LONGER_ truncates the page
that is sitting at index ~0UL.

[16768.998006] mkdir           R  running task        0  2717   2716 0x00000080
[16768.998073]  000000000000000e 0000000000000000 0000000000000000 ffff88000be00460
[16768.998157]  ffff88000ea65908 ffffffff810fec3e ffff88000ea65968 ffff8800229e7750
[16768.998241]  ffff88000ea658b8 0000000000000000 0000000000000000 ffff88000ea65958
[16768.998326] Call Trace:
[16768.998401]  [<ffffffff810fc6ed>] ? rcu_read_unlock+0x1c/0x2d
[16768.998473]  [<ffffffff810fec3e>] ? find_get_pages+0xf5/0x11b
[16768.998530]  [<ffffffff811078f0>] ? pagevec_lookup+0x20/0x2a
[16768.998586]  [<ffffffff8110920e>] ? truncate_inode_pages_range.part.2+0x161/0x39a
[16768.998680]  [<ffffffffa02ad5dc>] ? ll_md_blocking_ast+0x338/0x62f [lustre]
[16768.998744]  [<ffffffff8110947f>] ? truncate_inode_pages_range+0x38/0x3f
[16768.998805]  [<ffffffff811094f8>] ? truncate_inode_pages+0x12/0x14
[16768.998871]  [<ffffffffa02ad6e8>] ? ll_md_blocking_ast+0x444/0x62f [lustre]
[16768.998948]  [<ffffffff810981b5>] ? arch_local_irq_save+0x9/0xc
[16768.999022]  [<ffffffffa07ee0e8>] ? ldlm_cancel_callback+0x67/0x12a [ptlrpc]
[16768.999100]  [<ffffffffa07f85b2>] ? ldlm_cli_cancel_local+0xf3/0x2bc [ptlrpc]
[16768.999176]  [<ffffffffa07f9163>] ? ldlm_cli_cancel_list_local+0x7e/0x1e4 [ptlrpc]
[16768.999268]  [<ffffffffa07f9473>] ? ldlm_cancel_resource_local+0x1aa/0x1b9 [ptlrpc]
[16768.999385]  [<ffffffffa0657bad>] ? mdc_resource_get_unused+0xf8/0x115 [mdc]
[16768.999472]  [<ffffffff8109c887>] ? trace_hardirqs_on+0xd/0xf
[16768.999533]  [<ffffffffa06583d8>] ? mdc_create+0x11e/0x4db [mdc]
[16768.999597]  [<ffffffff8152ed84>] ? mutex_unlock+0xe/0x10
[16768.999654]  [<ffffffffa0350e99>] ? lmv_create+0x355/0x3e9 [lmv]
[16768.999712]  [<ffffffff811553b7>] ? final_putname+0x35/0x39
[16768.999775]  [<ffffffffa02ae167>] ? ll_new_node+0x33b/0x3ff [lustre]
[16768.999841]  [<ffffffffa02ae62c>] ? ll_mkdir+0xf2/0x127 [lustre]
[16768.999897]  [<ffffffff81156996>] ? vfs_mkdir+0x84/0xc9
[16768.999961]  [<ffffffff81158cf8>] ? SyS_mkdirat+0x77/0xad
[16769.000014]  [<ffffffff81158d47>] ? SyS_mkdir+0x19/0x1b
[16769.000066]  [<ffffffff81538652>] ? system_call_fastpath+0x16/0x1b

Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
---
 .../staging/lustre/lustre/include/lustre_lite.h    |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_lite.h b/drivers/staging/lustre/lustre/include/lustre_lite.h
index 25f8bfa..beccb5e 100644
--- a/drivers/staging/lustre/lustre/include/lustre_lite.h
+++ b/drivers/staging/lustre/lustre/include/lustre_lite.h
@@ -139,7 +139,11 @@ static inline unsigned long hash_x_index(__u64 hash, int hash64)
 {
 	if (BITS_PER_LONG == 32 && hash64)
 		hash >>= 32;
-	return ~0UL - hash;
+	/* save hash 0 as index 0 because otherwise we'll save it at
+	 * page index end (~0UL) and it causes truncate_inode_pages_range()
+	 * to loop forever.
+	 */
+	return ~0UL - (hash + !hash);
 }
 
 /** @} lite */
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4] staging/lustre: fix tv_usec build warning on parisc
  2013-10-21 15:18 [PATCH 1/4] lustre/fld: remove fld_thread_key Peng Tao
  2013-10-21 15:18 ` [PATCH 2/4] staging/lustre/llite: fix mkdir endless loop Peng Tao
@ 2013-10-21 15:18 ` Peng Tao
  2013-10-21 15:18 ` [PATCH 4/4] staging/lustre: fix coccinelle warnings Peng Tao
  2 siblings, 0 replies; 5+ messages in thread
From: Peng Tao @ 2013-10-21 15:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Peng Tao, Andreas Dilger

As reported by Fengguang:

config: make ARCH=parisc allyesconfig

All warnings:

   drivers/staging/lustre/lustre/llite/lproc_llite.c: In function 'll_rw_extents_stats_pp_seq_show':
>> drivers/staging/lustre/lustre/llite/lproc_llite.c:1069:6: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type '__kernel_suseconds_t' [-Wformat]
   drivers/staging/lustre/lustre/llite/lproc_llite.c: In function 'll_rw_extents_stats_seq_show':
>> drivers/staging/lustre/lustre/llite/lproc_llite.c:1133:6: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type '__kernel_suseconds_t' [-Wformat]
   drivers/staging/lustre/lustre/llite/lproc_llite.c: In function 'll_rw_offset_stats_seq_show':
>> drivers/staging/lustre/lustre/llite/lproc_llite.c:1299:6: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type '__kernel_suseconds_t' [-Wformat]
--
   drivers/staging/lustre/lustre/obdclass/lprocfs_status.c: In function 'lprocfs_stats_seq_show':
>> drivers/staging/lustre/lustre/obdclass/lprocfs_status.c:1070:5: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type '__kernel_suseconds_t' [-Wformat]
--
   drivers/staging/lustre/lustre/osc/lproc_osc.c: In function 'osc_rpc_stats_seq_show':
>> drivers/staging/lustre/lustre/osc/lproc_osc.c:575:6: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type '__kernel_suseconds_t' [-Wformat]
   drivers/staging/lustre/lustre/osc/lproc_osc.c: In function 'osc_stats_seq_show':
>> drivers/staging/lustre/lustre/osc/lproc_osc.c:687:6: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type '__kernel_suseconds_t' [-Wformat]

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
---
 drivers/staging/lustre/lustre/llite/lproc_llite.c  |    6 +++---
 .../lustre/lustre/obdclass/lprocfs_status.c        |    2 +-
 drivers/staging/lustre/lustre/osc/lproc_osc.c      |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c
index d4d3c17..4bf09c4 100644
--- a/drivers/staging/lustre/lustre/llite/lproc_llite.c
+++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c
@@ -1063,7 +1063,7 @@ static int ll_rw_extents_stats_pp_seq_show(struct seq_file *seq, void *v)
 		return 0;
 	}
 	seq_printf(seq, "snapshot_time:	 %lu.%lu (secs.usecs)\n",
-		   now.tv_sec, now.tv_usec);
+		   now.tv_sec, (unsigned long)now.tv_usec);
 	seq_printf(seq, "%15s %19s       | %20s\n", " ", "read", "write");
 	seq_printf(seq, "%13s   %14s %4s %4s  | %14s %4s %4s\n",
 		   "extents", "calls", "%", "cum%",
@@ -1127,7 +1127,7 @@ static int ll_rw_extents_stats_seq_show(struct seq_file *seq, void *v)
 		return 0;
 	}
 	seq_printf(seq, "snapshot_time:	 %lu.%lu (secs.usecs)\n",
-		   now.tv_sec, now.tv_usec);
+		   now.tv_sec, (unsigned long)now.tv_usec);
 
 	seq_printf(seq, "%15s %19s       | %20s\n", " ", "read", "write");
 	seq_printf(seq, "%13s   %14s %4s %4s  | %14s %4s %4s\n",
@@ -1293,7 +1293,7 @@ static int ll_rw_offset_stats_seq_show(struct seq_file *seq, void *v)
 	spin_lock(&sbi->ll_process_lock);
 
 	seq_printf(seq, "snapshot_time:	 %lu.%lu (secs.usecs)\n",
-		   now.tv_sec, now.tv_usec);
+		   now.tv_sec, (unsigned long)now.tv_usec);
 	seq_printf(seq, "%3s %10s %14s %14s %17s %17s %14s\n",
 		   "R/W", "PID", "RANGE START", "RANGE END",
 		   "SMALLEST EXTENT", "LARGEST EXTENT", "OFFSET");
diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
index a95f60a..76352c0 100644
--- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
+++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
@@ -1069,7 +1069,7 @@ static int lprocfs_stats_seq_show(struct seq_file *p, void *v)
 		struct timeval now;
 		do_gettimeofday(&now);
 		rc = seq_printf(p, "%-25s %lu.%lu secs.usecs\n",
-				"snapshot_time", now.tv_sec, now.tv_usec);
+				"snapshot_time", now.tv_sec, (unsigned long)now.tv_usec);
 		if (rc < 0)
 			return rc;
 	}
diff --git a/drivers/staging/lustre/lustre/osc/lproc_osc.c b/drivers/staging/lustre/lustre/osc/lproc_osc.c
index 90d24d8..ef10e2a 100644
--- a/drivers/staging/lustre/lustre/osc/lproc_osc.c
+++ b/drivers/staging/lustre/lustre/osc/lproc_osc.c
@@ -571,7 +571,7 @@ static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v)
 	client_obd_list_lock(&cli->cl_loi_list_lock);
 
 	seq_printf(seq, "snapshot_time:	 %lu.%lu (secs.usecs)\n",
-		   now.tv_sec, now.tv_usec);
+		   now.tv_sec, (unsigned long)now.tv_usec);
 	seq_printf(seq, "read RPCs in flight:  %d\n",
 		   cli->cl_r_in_flight);
 	seq_printf(seq, "write RPCs in flight: %d\n",
@@ -683,7 +683,7 @@ static int osc_stats_seq_show(struct seq_file *seq, void *v)
 	do_gettimeofday(&now);
 
 	seq_printf(seq, "snapshot_time:	 %lu.%lu (secs.usecs)\n",
-		   now.tv_sec, now.tv_usec);
+		   now.tv_sec, (unsigned long)now.tv_usec);
 	seq_printf(seq, "lockless_write_bytes\t\t"LPU64"\n",
 		   stats->os_lockless_writes);
 	seq_printf(seq, "lockless_read_bytes\t\t"LPU64"\n",
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/4] staging/lustre: fix coccinelle warnings
  2013-10-21 15:18 [PATCH 1/4] lustre/fld: remove fld_thread_key Peng Tao
  2013-10-21 15:18 ` [PATCH 2/4] staging/lustre/llite: fix mkdir endless loop Peng Tao
  2013-10-21 15:18 ` [PATCH 3/4] staging/lustre: fix tv_usec build warning on parisc Peng Tao
@ 2013-10-21 15:18 ` Peng Tao
  2013-10-27  3:15   ` Greg Kroah-Hartman
  2 siblings, 1 reply; 5+ messages in thread
From: Peng Tao @ 2013-10-21 15:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Fengguang Wu, Peng Tao, Andreas Dilger

From: Fengguang Wu <fengguang.wu@intel.com>

drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c:217:2-3: Unneeded semicolon

Removes unneeded semicolon.

Generated by: coccinelle/misc/semicolon.cocci

CC: Peng Tao <bergwolf@gmail.com>
CC: Andreas Dilger <andreas.dilger@intel.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
 drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c
index 6547f46..316103a 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c
@@ -207,7 +207,7 @@ static void enc_pools_release_free_pages(long npages)
 			p_idx++;
 			g_idx = 0;
 		}
-	};
+	}
 
 	/* free unused pools */
 	while (p_idx_max1 < p_idx_max2) {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 4/4] staging/lustre: fix coccinelle warnings
  2013-10-21 15:18 ` [PATCH 4/4] staging/lustre: fix coccinelle warnings Peng Tao
@ 2013-10-27  3:15   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-27  3:15 UTC (permalink / raw)
  To: Peng Tao; +Cc: linux-kernel, Fengguang Wu, Andreas Dilger

On Mon, Oct 21, 2013 at 11:18:25PM +0800, Peng Tao wrote:
> From: Fengguang Wu <fengguang.wu@intel.com>
> 
> drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c:217:2-3: Unneeded semicolon
> 
> Removes unneeded semicolon.
> 
> Generated by: coccinelle/misc/semicolon.cocci
> 
> CC: Peng Tao <bergwolf@gmail.com>
> CC: Andreas Dilger <andreas.dilger@intel.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>  drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This is already in my tree from someone else, sorry.

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-10-27  3:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-21 15:18 [PATCH 1/4] lustre/fld: remove fld_thread_key Peng Tao
2013-10-21 15:18 ` [PATCH 2/4] staging/lustre/llite: fix mkdir endless loop Peng Tao
2013-10-21 15:18 ` [PATCH 3/4] staging/lustre: fix tv_usec build warning on parisc Peng Tao
2013-10-21 15:18 ` [PATCH 4/4] staging/lustre: fix coccinelle warnings Peng Tao
2013-10-27  3:15   ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).