Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client

Pull Ceph fixes from Sage Weil:
"There is a fix for CephFS and RBD when used within containers/namespaces,
and a fix for the address learning the client is supposed to do when
initially talking to the Ceph cluster.

There are also two patches updating MAINTAINERS. One breaks out the
common Ceph code shared by fs/ceph and drivers/block/rbd.c into a
separate entry with the appropriate maintainers listed. The second
adds a second reference to the github tree where the Ceph client
development takes place (before it is pushed to korg and then to you).

The goal here is to move closer to a situation where Ilya Dryomov or
one of the other maintainers can push things to you if I am
unavailable. Ilya has done most of the work preparing branches for
upstream recently; you should not be surprised to hear from him if I
am trapped in some internet-less wasteland or hit by a bus or
something. In the meantime, we'll work on getting him added to the
kernel web of trust"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
MAINTAINERS: add secondary tree for ceph modules
MAINTAINERS: update ceph entries
libceph: treat sockaddr_storage with uninitialized family as blank
libceph: enable ceph in a non-default network namespace

+47 -18
+18 -4
MAINTAINERS
··· 2562 2562 F: arch/powerpc/oprofile/*cell* 2563 2563 F: arch/powerpc/platforms/cell/ 2564 2564 2565 - CEPH DISTRIBUTED FILE SYSTEM CLIENT 2565 + CEPH COMMON CODE (LIBCEPH) 2566 + M: Ilya Dryomov <idryomov@gmail.com> 2566 2567 M: "Yan, Zheng" <zyan@redhat.com> 2567 2568 M: Sage Weil <sage@redhat.com> 2568 2569 L: ceph-devel@vger.kernel.org 2569 2570 W: http://ceph.com/ 2570 2571 T: git git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git 2572 + T: git git://github.com/ceph/ceph-client.git 2571 2573 S: Supported 2572 - F: Documentation/filesystems/ceph.txt 2573 - F: fs/ceph/ 2574 2574 F: net/ceph/ 2575 2575 F: include/linux/ceph/ 2576 2576 F: include/linux/crush/ 2577 + 2578 + CEPH DISTRIBUTED FILE SYSTEM CLIENT (CEPH) 2579 + M: "Yan, Zheng" <zyan@redhat.com> 2580 + M: Sage Weil <sage@redhat.com> 2581 + M: Ilya Dryomov <idryomov@gmail.com> 2582 + L: ceph-devel@vger.kernel.org 2583 + W: http://ceph.com/ 2584 + T: git git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git 2585 + T: git git://github.com/ceph/ceph-client.git 2586 + S: Supported 2587 + F: Documentation/filesystems/ceph.txt 2588 + F: fs/ceph/ 2577 2589 2578 2590 CERTIFIED WIRELESS USB (WUSB) SUBSYSTEM: 2579 2591 L: linux-usb@vger.kernel.org ··· 8378 8366 M: Ilya Dryomov <idryomov@gmail.com> 8379 8367 M: Sage Weil <sage@redhat.com> 8380 8368 M: Alex Elder <elder@kernel.org> 8381 - M: ceph-devel@vger.kernel.org 8369 + L: ceph-devel@vger.kernel.org 8382 8370 W: http://ceph.com/ 8383 8371 T: git git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git 8372 + T: git git://github.com/ceph/ceph-client.git 8384 8373 S: Supported 8374 + F: Documentation/ABI/testing/sysfs-bus-rbd 8385 8375 F: drivers/block/rbd.c 8386 8376 F: drivers/block/rbd_types.h 8387 8377
+3
include/linux/ceph/messenger.h
··· 8 8 #include <linux/radix-tree.h> 9 9 #include <linux/uio.h> 10 10 #include <linux/workqueue.h> 11 + #include <net/net_namespace.h> 11 12 12 13 #include <linux/ceph/types.h> 13 14 #include <linux/ceph/buffer.h> ··· 57 56 struct ceph_entity_addr my_enc_addr; 58 57 59 58 atomic_t stopping; 59 + possible_net_t net; 60 60 bool nocrc; 61 61 bool tcp_nodelay; 62 62 ··· 269 267 u64 required_features, 270 268 bool nocrc, 271 269 bool tcp_nodelay); 270 + extern void ceph_messenger_fini(struct ceph_messenger *msgr); 272 271 273 272 extern void ceph_con_init(struct ceph_connection *con, void *private, 274 273 const struct ceph_connection_operations *ops,
+10 -6
net/ceph/ceph_common.c
··· 9 9 #include <keys/ceph-type.h> 10 10 #include <linux/module.h> 11 11 #include <linux/mount.h> 12 + #include <linux/nsproxy.h> 12 13 #include <linux/parser.h> 13 14 #include <linux/sched.h> 14 15 #include <linux/seq_file.h> ··· 17 16 #include <linux/statfs.h> 18 17 #include <linux/string.h> 19 18 #include <linux/vmalloc.h> 20 - #include <linux/nsproxy.h> 21 - #include <net/net_namespace.h> 22 19 23 20 24 21 #include <linux/ceph/ceph_features.h> ··· 129 130 int ofs = offsetof(struct ceph_options, mon_addr); 130 131 int i; 131 132 int ret; 133 + 134 + /* 135 + * Don't bother comparing options if network namespaces don't 136 + * match. 137 + */ 138 + if (!net_eq(current->nsproxy->net_ns, read_pnet(&client->msgr.net))) 139 + return -1; 132 140 133 141 ret = memcmp(opt1, opt2, ofs); 134 142 if (ret) ··· 340 334 const char *c; 341 335 int err = -ENOMEM; 342 336 substring_t argstr[MAX_OPT_ARGS]; 343 - 344 - if (current->nsproxy->net_ns != &init_net) 345 - return ERR_PTR(-EINVAL); 346 337 347 338 opt = kzalloc(sizeof(*opt), GFP_KERNEL); 348 339 if (!opt) ··· 611 608 fail_monc: 612 609 ceph_monc_stop(&client->monc); 613 610 fail: 611 + ceph_messenger_fini(&client->msgr); 614 612 kfree(client); 615 613 return ERR_PTR(err); 616 614 } ··· 625 621 626 622 /* unmount */ 627 623 ceph_osdc_stop(&client->osdc); 628 - 629 624 ceph_monc_stop(&client->monc); 625 + ceph_messenger_fini(&client->msgr); 630 626 631 627 ceph_debugfs_client_cleanup(client); 632 628
+16 -8
net/ceph/messenger.c
··· 6 6 #include <linux/inet.h> 7 7 #include <linux/kthread.h> 8 8 #include <linux/net.h> 9 + #include <linux/nsproxy.h> 9 10 #include <linux/slab.h> 10 11 #include <linux/socket.h> 11 12 #include <linux/string.h> ··· 480 479 int ret; 481 480 482 481 BUG_ON(con->sock); 483 - ret = sock_create_kern(&init_net, con->peer_addr.in_addr.ss_family, 482 + ret = sock_create_kern(read_pnet(&con->msgr->net), paddr->ss_family, 484 483 SOCK_STREAM, IPPROTO_TCP, &sock); 485 484 if (ret) 486 485 return ret; ··· 1732 1731 1733 1732 static bool addr_is_blank(struct sockaddr_storage *ss) 1734 1733 { 1734 + struct in_addr *addr = &((struct sockaddr_in *)ss)->sin_addr; 1735 + struct in6_addr *addr6 = &((struct sockaddr_in6 *)ss)->sin6_addr; 1736 + 1735 1737 switch (ss->ss_family) { 1736 1738 case AF_INET: 1737 - return ((struct sockaddr_in *)ss)->sin_addr.s_addr == 0; 1739 + return addr->s_addr == htonl(INADDR_ANY); 1738 1740 case AF_INET6: 1739 - return 1740 - ((struct sockaddr_in6 *)ss)->sin6_addr.s6_addr32[0] == 0 && 1741 - ((struct sockaddr_in6 *)ss)->sin6_addr.s6_addr32[1] == 0 && 1742 - ((struct sockaddr_in6 *)ss)->sin6_addr.s6_addr32[2] == 0 && 1743 - ((struct sockaddr_in6 *)ss)->sin6_addr.s6_addr32[3] == 0; 1741 + return ipv6_addr_any(addr6); 1742 + default: 1743 + return true; 1744 1744 } 1745 - return false; 1746 1745 } 1747 1746 1748 1747 static int addr_port(struct sockaddr_storage *ss) ··· 2945 2944 msgr->tcp_nodelay = tcp_nodelay; 2946 2945 2947 2946 atomic_set(&msgr->stopping, 0); 2947 + write_pnet(&msgr->net, get_net(current->nsproxy->net_ns)); 2948 2948 2949 2949 dout("%s %p\n", __func__, msgr); 2950 2950 } 2951 2951 EXPORT_SYMBOL(ceph_messenger_init); 2952 + 2953 + void ceph_messenger_fini(struct ceph_messenger *msgr) 2954 + { 2955 + put_net(read_pnet(&msgr->net)); 2956 + } 2957 + EXPORT_SYMBOL(ceph_messenger_fini); 2952 2958 2953 2959 static void clear_standby(struct ceph_connection *con) 2954 2960 {