Linux Kernel Mailing List | 1 Apr 2011 02:59

ceph: flush msgr_wq during mds_client shutdown

Gitweb:     http://git.kernel.org/linus/ef550f6f4f6c9345a27ec85d98f4f7de1adce79c
Commit:     ef550f6f4f6c9345a27ec85d98f4f7de1adce79c
Parent:     59c2be1e4d42c0d4949cecdeef3f37070a1fbc13
Author:     Sage Weil <sage <at> newdream.net>
AuthorDate: Fri Mar 25 13:27:48 2011 -0700
Committer:  Sage Weil <sage <at> newdream.net>
CommitDate: Fri Mar 25 13:27:48 2011 -0700

    ceph: flush msgr_wq during mds_client shutdown

    The release method for mds connections uses a backpointer to the
    mds_client, so we need to flush the workqueue of any pending work (and
    ceph_connection references) prior to freeing the mds_client.  This fixes
    an oops easily triggered under UML by

     while true ; do mount ... ; umount ... ; done

    Also fix an outdated comment: the flush in ceph_destroy_client only flushes
    OSD connections out.  This bug is basically an artifact of the ceph ->
    ceph+libceph conversion.

    Signed-off-by: Sage Weil <sage <at> newdream.net>
---
 fs/ceph/mds_client.c   |    6 ++++++
 net/ceph/ceph_common.c |    4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index a1ee8fa..f60b07b 100644
--- a/fs/ceph/mds_client.c
(Continue reading)

Linux Kernel Mailing List | 1 Apr 2011 02:59

libceph: fix null dereference when unregistering linger requests

Gitweb:     http://git.kernel.org/linus/fbdb9190482fd83a3eb20cdeb0da454759f479d7
Commit:     fbdb9190482fd83a3eb20cdeb0da454759f479d7
Parent:     234af26ff123dfb2aa48772124721b1354c8e0a5
Author:     Sage Weil <sage <at> newdream.net>
AuthorDate: Tue Mar 29 12:11:06 2011 -0700
Committer:  Sage Weil <sage <at> newdream.net>
CommitDate: Tue Mar 29 12:11:06 2011 -0700

    libceph: fix null dereference when unregistering linger requests

    We should only clear r_osd if we are neither registered as a linger or a
    regular request.  We may unregister as a linger while still registered as
    a regular request (e.g., in reset_osd).  Incorrectly clearing r_osd there
    leads to a null pointer dereference in __send_request.

    Also simplify the parallel check in __unregister_request() where we just
    removed r_osd_item and know it's empty.

    Signed-off-by: Sage Weil <sage <at> newdream.net>
---
 net/ceph/osd_client.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 03740e8..3b91d65 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
 <at>  <at>  -837,8 +837,7  <at>  <at>  static void __unregister_request(struct ceph_osd_client *osdc,
 			dout("moving osd to %p lru\n", req->r_osd);
 			__move_osd_to_lru(osdc, req->r_osd);
(Continue reading)

Linux Kernel Mailing List | 1 Apr 2011 02:59

ceph: unlock on error in ceph_osdc_start_request()

Gitweb:     http://git.kernel.org/linus/234af26ff123dfb2aa48772124721b1354c8e0a5
Commit:     234af26ff123dfb2aa48772124721b1354c8e0a5
Parent:     6b0ae4097c1ebad98c7b33f83b4ca7e93890ed12
Author:     Dan Carpenter <error27 <at> gmail.com>
AuthorDate: Tue Mar 29 06:25:59 2011 +0300
Committer:  Sage Weil <sage <at> newdream.net>
CommitDate: Tue Mar 29 08:59:54 2011 -0700

    ceph: unlock on error in ceph_osdc_start_request()

    There was a missing unlock on the error path if __map_request() failed.

    Signed-off-by: Dan Carpenter <error27 <at> gmail.com>
    Signed-off-by: Sage Weil <sage <at> newdream.net>
---
 net/ceph/osd_client.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index b6776cb..03740e8 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
 <at>  <at>  -1672,7 +1672,7  <at>  <at>  int ceph_osdc_start_request(struct ceph_osd_client *osdc,
 	if (req->r_sent == 0) {
 		rc = __map_request(osdc, req);
 		if (rc < 0)
-			return rc;
+			goto out_unlock;
 		if (req->r_osd == NULL) {
 			dout("send_request %p no up osds in pg\n", req);
(Continue reading)

Linux Kernel Mailing List | 1 Apr 2011 02:59

ceph: Move secret key parsing earlier.

Gitweb:     http://git.kernel.org/linus/8323c3aa74cd92465350294567142d12ffdcc963
Commit:     8323c3aa74cd92465350294567142d12ffdcc963
Parent:     fbdb9190482fd83a3eb20cdeb0da454759f479d7
Author:     Tommi Virtanen <tommi.virtanen <at> dreamhost.com>
AuthorDate: Fri Mar 25 16:32:57 2011 -0700
Committer:  Sage Weil <sage <at> newdream.net>
CommitDate: Tue Mar 29 12:11:16 2011 -0700

    ceph: Move secret key parsing earlier.

    This makes the base64 logic be contained in mount option parsing,
    and prepares us for replacing the homebew key management with the
    kernel key retention service.

    Signed-off-by: Tommi Virtanen <tommi.virtanen <at> dreamhost.com>
    Signed-off-by: Sage Weil <sage <at> newdream.net>
---
 fs/ceph/super.c              |    2 +-
 include/linux/ceph/auth.h    |    4 +-
 include/linux/ceph/libceph.h |    2 +-
 net/ceph/auth.c              |    8 +++---
 net/ceph/auth_x.c            |    8 ++++--
 net/ceph/ceph_common.c       |   43 +++++++++++++++++++++++++++++++++++------
 net/ceph/crypto.c            |   11 ++++++++++
 net/ceph/crypto.h            |    2 +
 net/ceph/mon_client.c        |    2 +-
 9 files changed, 63 insertions(+), 19 deletions(-)

diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index a9e78b4..f2f77fd 100644
(Continue reading)

Linux Kernel Mailing List | 1 Apr 2011 02:59

ceph: fix possible NULL pointer dereference

Gitweb:     http://git.kernel.org/linus/6b0ae4097c1ebad98c7b33f83b4ca7e93890ed12
Commit:     6b0ae4097c1ebad98c7b33f83b4ca7e93890ed12
Parent:     ef550f6f4f6c9345a27ec85d98f4f7de1adce79c
Author:     Mariusz Kozlowski <mk <at> lab.zgora.pl>
AuthorDate: Sat Mar 26 19:29:34 2011 +0100
Committer:  Sage Weil <sage <at> newdream.net>
CommitDate: Sat Mar 26 13:41:20 2011 -0700

    ceph: fix possible NULL pointer dereference

    This patch fixes 'event_work' dereference before it is checked for NULL.

    Signed-off-by: Mariusz Kozlowski <mk <at> lab.zgora.pl>
    Signed-off-by: Sage Weil <sage <at> newdream.net>
---
 net/ceph/osd_client.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 02212ed..b6776cb 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
 <at>  <at>  -1602,11 +1602,11  <at>  <at>  void handle_watch_notify(struct ceph_osd_client *osdc, struct ceph_msg *msg)
 	     cookie, ver, event);
 	if (event) {
 		event_work = kmalloc(sizeof(*event_work), GFP_NOIO);
-		INIT_WORK(&event_work->work, do_event_work);
 		if (!event_work) {
 			dout("ERROR: could not allocate event_work\n");
 			goto done_err;
(Continue reading)

Linux Kernel Mailing List | 1 Apr 2011 02:59

nilfs2: fix oops due to a bad aops initialization

Gitweb:     http://git.kernel.org/linus/d611b22f1a5ddd0823e9d6a30bac91219f800e41
Commit:     d611b22f1a5ddd0823e9d6a30bac91219f800e41
Parent:     34094537943113467faee98fe67c8a3d3f9a0a8b
Author:     Ryusuke Konishi <konishi.ryusuke <at> lab.ntt.co.jp>
AuthorDate: Wed Mar 30 11:49:20 2011 +0900
Committer:  Ryusuke Konishi <konishi.ryusuke <at> lab.ntt.co.jp>
CommitDate: Wed Mar 30 17:39:25 2011 +0900

    nilfs2: fix oops due to a bad aops initialization

    Nilfs in 2.6.39-rc1 hit the following oops:

     BUG: unable to handle kernel NULL pointer dereference at 0000000000000048
     IP: [<ffffffff810ac235>] try_to_release_page+0x2a/0x3d
     PGD 234cb6067 PUD 234c72067 PMD 0
     Oops: 0000 [#1] SMP
     <snip>
     Process truncate (pid: 10995, threadinfo ffff8802353c2000, task ffff880234cfa000)
     Stack:
      ffff8802333c77b8 ffffffff810b64b0 0000000000003802 ffffffffa0052cca
      0000000000000000 ffff8802353c3b58 0000000000000000 ffff8802353c3b58
      0000000000000001 0000000000000000 ffffea0007b92308 ffffea0007b92308
     Call Trace:
      [<ffffffff810b64b0>] ? invalidate_inode_pages2_range+0x15f/0x273
      [<ffffffffa0052cca>] ? nilfs_palloc_get_block+0x2d/0xaf [nilfs2]
      [<ffffffff810589e7>] ? bit_waitqueue+0x14/0xa1
      [<ffffffff81058ab1>] ? wake_up_bit+0x10/0x20
      [<ffffffffa00433fd>] ? nilfs_forget_buffer+0x66/0x7a [nilfs2]
      [<ffffffffa00467b8>] ? nilfs_btree_concat_left+0x5c/0x77 [nilfs2]
      [<ffffffffa00471fc>] ? nilfs_btree_delete+0x395/0x3cf [nilfs2]
(Continue reading)

Linux Kernel Mailing List | 1 Apr 2011 02:59

libceph: Create a new key type "ceph".

Gitweb:     http://git.kernel.org/linus/4b2a58abd1e17c0ee53c8dded879e015917cca67
Commit:     4b2a58abd1e17c0ee53c8dded879e015917cca67
Parent:     e2c3d29b4295c3eec18294bc34f0c99a7b9ae413
Author:     Tommi Virtanen <tommi.virtanen <at> dreamhost.com>
AuthorDate: Mon Mar 28 14:59:38 2011 -0700
Committer:  Sage Weil <sage <at> newdream.net>
CommitDate: Tue Mar 29 12:11:24 2011 -0700

    libceph: Create a new key type "ceph".

    This allows us to use existence of the key type as a feature test,
    from userspace.

    Signed-off-by: Tommi Virtanen <tommi.virtanen <at> dreamhost.com>
    Signed-off-by: Sage Weil <sage <at> newdream.net>
---
 include/keys/ceph-type.h |    8 ++++++
 net/ceph/ceph_common.c   |   21 +++++++++------
 net/ceph/crypto.c        |   62 ++++++++++++++++++++++++++++++++++++++++++++++
 net/ceph/crypto.h        |    2 +
 4 files changed, 85 insertions(+), 8 deletions(-)

diff --git a/include/keys/ceph-type.h b/include/keys/ceph-type.h
new file mode 100644
index 0000000..f69c4ac
--- /dev/null
+++ b/include/keys/ceph-type.h
 <at>  <at>  -0,0 +1,8  <at>  <at> 
+#ifndef _KEYS_CEPH_TYPE_H
+#define _KEYS_CEPH_TYPE_H
(Continue reading)

Linux Kernel Mailing List | 1 Apr 2011 02:59

nilfs2: fix whitespace coding style issues

Gitweb:     http://git.kernel.org/linus/af71dda0b8e667d03eec21d25f90265eec5efea1
Commit:     af71dda0b8e667d03eec21d25f90265eec5efea1
Parent:     d611b22f1a5ddd0823e9d6a30bac91219f800e41
Author:     Nicolas Kaiser <nikai <at> nikai.net>
AuthorDate: Sat Mar 19 16:47:54 2011 +0100
Committer:  Ryusuke Konishi <konishi.ryusuke <at> lab.ntt.co.jp>
CommitDate: Wed Mar 30 17:39:54 2011 +0900

    nilfs2: fix whitespace coding style issues

    Fixes whitespace coding style issues.

    Signed-off-by: Nicolas Kaiser <nikai <at> nikai.net>
    Signed-off-by: Ryusuke Konishi <konishi.ryusuke <at> lab.ntt.co.jp>
---
 fs/nilfs2/nilfs.h |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fs/nilfs2/nilfs.h b/fs/nilfs2/nilfs.h
index 856e8e4..a8dd344 100644
--- a/fs/nilfs2/nilfs.h
+++ b/fs/nilfs2/nilfs.h
 <at>  <at>  -114,19 +114,19  <at>  <at>  enum {
  * Macros to check inode numbers
  */
 #define NILFS_MDT_INO_BITS   \
-  ((unsigned int)(1 << NILFS_DAT_INO | 1 << NILFS_CPFILE_INO |		\
-		  1 << NILFS_SUFILE_INO | 1 << NILFS_IFILE_INO |	\
-		  1 << NILFS_ATIME_INO | 1 << NILFS_SKETCH_INO))
+	((unsigned int)(1 << NILFS_DAT_INO | 1 << NILFS_CPFILE_INO |	\
(Continue reading)

Linux Kernel Mailing List | 1 Apr 2011 02:59

nilfs2: fix data loss in mmap page write for hole blocks

Gitweb:     http://git.kernel.org/linus/34094537943113467faee98fe67c8a3d3f9a0a8b
Commit:     34094537943113467faee98fe67c8a3d3f9a0a8b
Parent:     0ce790e7d736cedc563e1fb4e998babf5a4dbc3d
Author:     Ryusuke Konishi <konishi.ryusuke <at> lab.ntt.co.jp>
AuthorDate: Sun Mar 27 22:50:49 2011 +0900
Committer:  Ryusuke Konishi <konishi.ryusuke <at> lab.ntt.co.jp>
CommitDate: Wed Mar 30 10:45:31 2011 +0900

    nilfs2: fix data loss in mmap page write for hole blocks

    From the result of a function test of mmap, mmap write to shared pages
    turned out to be broken for hole blocks.  It doesn't write out filled
    blocks and the data will be lost after umount.  This is due to a bug
    that the target file is not queued for log writer when filling hole
    blocks.

    Also, nilfs_page_mkwrite function exits normal code path even after
    successfully filled hole blocks due to a change of block_page_mkwrite
    function; just after nilfs was merged into the mainline,
    block_page_mkwrite() started to return VM_FAULT_LOCKED instead of zero
    by the patch "mm: close page_mkwrite races" (commit:
    b827e496c893de0c).  The current nilfs_page_mkwrite() is not handling
    this value properly.

    This corrects nilfs_page_mkwrite() and will resolve the data loss
    problem in mmap write.

    [This should be applied to every kernel since 2.6.30 but a fix is
     needed for 2.6.37 and prior kernels]

(Continue reading)

Linux Kernel Mailing List | 1 Apr 2011 02:59

libceph: Get secret from the kernel keys api when mounting with key=NAME.

Gitweb:     http://git.kernel.org/linus/e2c3d29b4295c3eec18294bc34f0c99a7b9ae413
Commit:     e2c3d29b4295c3eec18294bc34f0c99a7b9ae413
Parent:     8323c3aa74cd92465350294567142d12ffdcc963
Author:     Tommi Virtanen <tommi.virtanen <at> dreamhost.com>
AuthorDate: Fri Mar 25 16:40:48 2011 -0700
Committer:  Sage Weil <sage <at> newdream.net>
CommitDate: Tue Mar 29 12:11:19 2011 -0700

    libceph: Get secret from the kernel keys api when mounting with key=NAME.

    Signed-off-by: Tommi Virtanen <tommi.virtanen <at> dreamhost.com>
    Signed-off-by: Sage Weil <sage <at> newdream.net>
---
 net/ceph/Kconfig       |    1 +
 net/ceph/ceph_common.c |   58 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 0 deletions(-)

diff --git a/net/ceph/Kconfig b/net/ceph/Kconfig
index ad42404..be683f2 100644
--- a/net/ceph/Kconfig
+++ b/net/ceph/Kconfig
 <at>  <at>  -4,6 +4,7  <at>  <at>  config CEPH_LIB
 	select LIBCRC32C
 	select CRYPTO_AES
 	select CRYPTO
+	select KEYS
 	default n
 	help
 	  Choose Y or M here to include cephlib, which provides the
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
(Continue reading)


Gmane