1. 07 3月, 2017 1 次提交
  2. 25 8月, 2016 2 次提交
  3. 28 7月, 2016 2 次提交
    • A
      ceph: fix symbol versioning for ceph_monc_do_statfs · a0f2b652
      Arnd Bergmann 提交于
      The genksyms helper in the kernel cannot parse a type definition
      like "typeof(((type *)0)->keyfld)" that is used in the DEFINE_RB_FUNCS
      helper, causing the following EXPORT_SYMBOL() statement to be ignored
      when computing the crcs, and triggering a warning about this:
      
      WARNING: "ceph_monc_do_statfs" [fs/ceph/ceph.ko] has no CRC
      
      To work around the problem, we can rewrite the type to reference
      an undefined 'extern' symbol instead of a NULL pointer. This is
      evidently ok for genksyms, and it no longer complains about the
      line when calling it with 'genksyms -w'.
      
      I've looked briefly into extending genksyms instead, but it seems
      really hard to do. Jan Beulich introduced basic support for 'typeof'
      a while ago in dc533240 ("genksyms: fix typeof() handling"),
      but that is not sufficient for the expression we have here.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: fcd00b68 ("libceph: DEFINE_RB_FUNCS macro")
      Cc: Jan Beulich <jbeulich@suse.com>
      Cc: Michal Marek <mmarek@suse.cz>
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      a0f2b652
    • Y
      libceph: introduce reference counted string · 51e92737
      Yan, Zheng 提交于
      The data structure is for storing namesapce string. It allows namespace
      string to be shared between cephfs inodes with same layout. This data
      structure can also be referenced by OSD request.
      Signed-off-by: NYan, Zheng <zyan@redhat.com>
      51e92737
  4. 26 5月, 2016 1 次提交
    • I
      libceph: DEFINE_RB_FUNCS macro · fcd00b68
      Ilya Dryomov 提交于
      Given
      
          struct foo {
              u64 id;
              struct rb_node bar_node;
          };
      
      generate insert_bar(), erase_bar() and lookup_bar() functions with
      
          DEFINE_RB_FUNCS(bar, struct foo, id, bar_node)
      
      The key is assumed to be an integer (u64, int, etc), compared with
      < and >.  nodefld has to be initialized with RB_CLEAR_NODE().
      
      Start using it for MDS, MON and OSD requests and OSD sessions.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      fcd00b68
  5. 05 4月, 2016 1 次提交
    • K
      mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros · 09cbfeaf
      Kirill A. Shutemov 提交于
      PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
      ago with promise that one day it will be possible to implement page
      cache with bigger chunks than PAGE_SIZE.
      
      This promise never materialized.  And unlikely will.
      
      We have many places where PAGE_CACHE_SIZE assumed to be equal to
      PAGE_SIZE.  And it's constant source of confusion on whether
      PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
      especially on the border between fs and mm.
      
      Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
      breakage to be doable.
      
      Let's stop pretending that pages in page cache are special.  They are
      not.
      
      The changes are pretty straight-forward:
      
       - <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
      
       - page_cache_get() -> get_page();
      
       - page_cache_release() -> put_page();
      
      This patch contains automated changes generated with coccinelle using
      script below.  For some reason, coccinelle doesn't patch header files.
      I've called spatch for them manually.
      
      The only adjustment after coccinelle is revert of changes to
      PAGE_CAHCE_ALIGN definition: we are going to drop it later.
      
      There are few places in the code where coccinelle didn't reach.  I'll
      fix them manually in a separate patch.  Comments and documentation also
      will be addressed with the separate patch.
      
      virtual patch
      
      @@
      expression E;
      @@
      - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      expression E;
      @@
      - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      @@
      - PAGE_CACHE_SHIFT
      + PAGE_SHIFT
      
      @@
      @@
      - PAGE_CACHE_SIZE
      + PAGE_SIZE
      
      @@
      @@
      - PAGE_CACHE_MASK
      + PAGE_MASK
      
      @@
      expression E;
      @@
      - PAGE_CACHE_ALIGN(E)
      + PAGE_ALIGN(E)
      
      @@
      expression E;
      @@
      - page_cache_get(E)
      + get_page(E)
      
      @@
      expression E;
      @@
      - page_cache_release(E)
      + put_page(E)
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      09cbfeaf
  6. 26 3月, 2016 2 次提交
    • I
      libceph: monc hunt rate is 3s with backoff up to 30s · 168b9090
      Ilya Dryomov 提交于
      Unless we are in the process of setting up a client (i.e. connecting to
      the monitor cluster for the first time), apply a backoff: every time we
      want to reopen a session, increase our timeout by a multiple (currently
      2); when we complete the connection, reduce that multipler by 50%.
      
      Mirrors ceph.git commit 794c86fd289bd62a35ed14368fa096c46736e9a2.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      168b9090
    • I
      libceph: monc ping rate is 10s · 58d81b12
      Ilya Dryomov 提交于
      Split ping interval and ping timeout: ping interval is 10s; keepalive
      timeout is 30s.
      
      Make monc_ping_timeout a constant while at it - it's not actually
      exported as a mount option (and the rest of tick-related settings won't
      be either), so it's got no place in ceph_options.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      58d81b12
  7. 03 11月, 2015 2 次提交
    • I
      libceph: add nocephx_sign_messages option · a51983e4
      Ilya Dryomov 提交于
      Support for message signing was merged into 3.19, along with
      nocephx_require_signatures option.  But, all that option does is allow
      the kernel client to talk to clusters that don't support MSG_AUTH
      feature bit.  That's pretty useless, given that it's been supported
      since bobtail.
      
      Meanwhile, if one disables message signing on the server side with
      "cephx sign messages = false", it becomes impossible to use the kernel
      client since it expects messages to be signed if MSG_AUTH was
      negotiated.  Add nocephx_sign_messages option to support this use case.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      a51983e4
    • I
      libceph: stop duplicating client fields in messenger · 859bff51
      Ilya Dryomov 提交于
      supported_features and required_features serve no purpose at all, while
      nocrc and tcp_nodelay belong to ceph_options::flags.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      859bff51
  8. 09 9月, 2015 1 次提交
  9. 25 6月, 2015 3 次提交
  10. 20 4月, 2015 2 次提交
  11. 19 2月, 2015 1 次提交
  12. 18 12月, 2014 2 次提交
  13. 15 10月, 2014 1 次提交
  14. 07 5月, 2014 1 次提交
  15. 26 1月, 2014 1 次提交
    • I
      libceph: add ceph_kv{malloc,free}() and switch to them · eeb0bed5
      Ilya Dryomov 提交于
      Encapsulate kmalloc vs vmalloc memory allocation and freeing logic into
      two helpers, ceph_kvmalloc() and ceph_kvfree(), and switch to them.
      
      ceph_kvmalloc() kmalloc()'s a maximum of 8 pages, anything bigger is
      vmalloc()'ed with __GFP_HIGHMEM set.  This changes the existing
      behaviour:
      
      - for buffers (ceph_buffer_new()), from trying to kmalloc() everything
        and using vmalloc() just as a fallback
      
      - for messages (ceph_msg_new()), from going to vmalloc() for anything
        bigger than a page
      
      - for messages (ceph_msg_new()), from disallowing vmalloc() to use high
        memory
      Signed-off-by: NIlya Dryomov <ilya.dryomov@inktank.com>
      Reviewed-by: NSage Weil <sage@inktank.com>
      eeb0bed5
  16. 01 1月, 2014 1 次提交
  17. 02 5月, 2013 2 次提交
  18. 20 2月, 2013 2 次提交
  19. 14 2月, 2013 1 次提交
    • A
      libceph: add a compatibility check interface · 72fe25e3
      Alex Elder 提交于
      An upcoming change implements semantic change that could lead to
      a crash if an old version of the libceph kernel module is used with
      a new version of the rbd kernel module.
      
      In order to preclude that possibility, this adds a compatibilty
      check interface.  If this interface doesn't exist, the modules are
      obviously not compatible.  But if it does exist, this provides a way
      of letting the caller know whether it will operate properly with
      this libceph module.
      
      Perhaps confusingly, it returns false right now.  The semantic
      change mentioned above will make it return true.
      
      This resolves:
          http://tracker.ceph.com/issues/3800Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      72fe25e3
  20. 13 12月, 2012 1 次提交
    • S
      libceph: remove 'osdtimeout' option · 83aff95e
      Sage Weil 提交于
      This would reset a connection with any OSD that had an outstanding
      request that was taking more than N seconds.  The idea was that if the
      OSD was buggy, the client could compensate by resending the request.
      
      In reality, this only served to hide server bugs, and we haven't
      actually seen such a bug in quite a while.  Moreover, the userspace
      client code never did this.
      
      More importantly, often the request is taking a long time because the
      OSD is trying to recover, or overloaded, and killing the connection
      and retrying would only make the situation worse by giving the OSD
      more work to do.
      Signed-off-by: NSage Weil <sage@inktank.com>
      Reviewed-by: NAlex Elder <elder@inktank.com>
      83aff95e
  21. 03 10月, 2012 1 次提交
  22. 31 7月, 2012 2 次提交
  23. 01 6月, 2012 1 次提交
  24. 22 3月, 2012 1 次提交
  25. 05 3月, 2012 1 次提交
    • P
      BUG: headers with BUG/BUG_ON etc. need linux/bug.h · 187f1882
      Paul Gortmaker 提交于
      If a header file is making use of BUG, BUG_ON, BUILD_BUG_ON, or any
      other BUG variant in a static inline (i.e. not in a #define) then
      that header really should be including <linux/bug.h> and not just
      expecting it to be implicitly present.
      
      We can make this change risk-free, since if the files using these
      headers didn't have exposure to linux/bug.h already, they would have
      been causing compile failures/warnings.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      187f1882
  26. 26 10月, 2011 1 次提交
  27. 21 7月, 2011 1 次提交
    • P
      treewide: fix potentially dangerous trailing ';' in #defined values/expressions · 497888cf
      Phil Carmody 提交于
      All these are instances of
        #define NAME value;
      or
        #define NAME(params_opt) value;
      
      These of course fail to build when used in contexts like
        if(foo $OP NAME)
        while(bar $OP NAME)
      and may silently generate the wrong code in contexts such as
        foo = NAME + 1;    /* foo = value; + 1; */
        bar = NAME - 1;    /* bar = value; - 1; */
        baz = NAME & quux; /* baz = value; & quux; */
      
      Reported on comp.lang.c,
      Message-ID: <ab0d55fe-25e5-482b-811e-c475aa6065c3@c29g2000yqd.googlegroups.com>
      Initial analysis of the dangers provided by Keith Thompson in that thread.
      
      There are many more instances of more complicated macros having unnecessary
      trailing semicolons, but this pile seems to be all of the cases of simple
      values suffering from the problem. (Thus things that are likely to be found
      in one of the contexts above, more complicated ones aren't.)
      Signed-off-by: NPhil Carmody <ext-phil.2.carmody@nokia.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      497888cf
  28. 30 3月, 2011 1 次提交
  29. 22 3月, 2011 1 次提交