1. 03 5月, 2013 3 次提交
  2. 02 5月, 2013 1 次提交
  3. 17 4月, 2013 7 次提交
  4. 29 3月, 2013 1 次提交
  5. 27 3月, 2013 4 次提交
  6. 23 3月, 2013 1 次提交
  7. 28 2月, 2013 7 次提交
  8. 27 2月, 2013 3 次提交
    • S
      libceph: update osd request/reply encoding · 1b83bef2
      Sage Weil 提交于
      Use the new version of the encoding for osd requests and replies.  In the
      process, update the way we are tracking request ops and reply lengths and
      results in the struct ceph_osd_request.  Update the rbd and fs/ceph users
      appropriately.
      
      The main changes are:
       - we keep pointers into the request memory for fields we need to update
         each time the request is sent out over the wire
       - we keep information about the result in an array in the request struct
         where the users can easily get at it.
      Signed-off-by: NSage Weil <sage@inktank.com>
      Reviewed-by: NAlex Elder <elder@inktank.com>
      1b83bef2
    • A
      rbd: pass length, not op for osd completions · c47f9371
      Alex Elder 提交于
      The only thing type-specific osd completion functions do with their
      osd op parameter is (in some cases) extract the number of bytes
      transferred from it.  In the other cases, the xferred bytes field
      is not used, and total message data transfer byte count (which may
      well be zero) is used.
      
      Just set the object request transfer count in the main osd request
      callback function and provide that to the other routines.  There is
      then no longer any need to pass the op pointer to the type-specific
      completion routines, so drop those parameters.
      
      Stop doing anything with the total message data length.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NSage Weil <sage@inktank.com>
      c47f9371
    • A
      rbd: move rbd_osd_trivial_callback() · 39bf2c5d
      Alex Elder 提交于
      This function is slightly out of place, probably the result
      of an errant automatic merge or something.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NSage Weil <sage@inktank.com>
      39bf2c5d
  9. 26 2月, 2013 5 次提交
  10. 23 2月, 2013 1 次提交
  11. 22 2月, 2013 6 次提交
    • G
      loopdev: ignore negative offset when calculate loop device size · b7a1da69
      Guo Chao 提交于
      Negative offset may cause loop device size larger than backing file
      size.
      
       $ fallocate -l 1M a
       $ losetup --offset 0xffffffffffff0000 /dev/loop0 a
       $ blockdev --getsize64 /dev/loop0
       1114112
       $ ls -l a
       -rw-r--r-- 1 root root 1048576 Jan 23 12:46 a
       $ cat /dev/loop0
       cat: /dev/loop0: Input/output error
      
      It makes no sense to do that. Only apply offset when it's positive.
      
      Fix a typo in the comment by the way.
      Signed-off-by: NGuo Chao <yan@linux.vnet.ibm.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Guo Chao <yan@linux.vnet.ibm.com>
      Cc: M. Hindess <hindessm@uk.ibm.com>
      Cc: Nikanth Karthikesan <knikanth@suse.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      b7a1da69
    • G
      loopdev: remove an user triggerable oops · b1a66504
      Guo Chao 提交于
      When loopdev is built as module and we pass an invalid parameter,
      loop_init() will return directly without deregister misc device, which
      will cause an oops when insert loop module next time because we left some
      garbage in the misc device list.
      
      Test case:
      sudo modprobe loop max_part=1024
      (failed due to invalid parameter)
      sudo modprobe loop
      (oops)
      
      Clean up nicely to avoid such oops.
      Signed-off-by: NGuo Chao <yan@linux.vnet.ibm.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Guo Chao <yan@linux.vnet.ibm.com>
      Cc: M. Hindess <hindessm@uk.ibm.com>
      Cc: Nikanth Karthikesan <knikanth@suse.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      b1a66504
    • G
      loopdev: move common code into loop_figure_size() · 7b0576a3
      Guo Chao 提交于
      Update block device size in accord with gendisk size and let userspace
      know the change in loop_figure_size(). This is a clean up to remove
      common code of loop_figure_size()'s two callers.
      Signed-off-by: NGuo Chao <yan@linux.vnet.ibm.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Guo Chao <yan@linux.vnet.ibm.com>
      Cc: M. Hindess <hindessm@uk.ibm.com>
      Cc: Nikanth Karthikesan <knikanth@suse.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      7b0576a3
    • G
      loopdev: update block device size in loop_set_status() · 541c742a
      Guo Chao 提交于
      Loop device driver sometimes fails to impose the size limit on the
      device. Keep issuing following two commands:
      
      losetup --offset 7517244416 --sizelimit 3224971264 /dev/loop0 backed_file
      blockdev --getsize64 /dev/loop0
      
      blockdev reports file size instead of sizelimit several out of 100 times.
      
      The problems are:
      
      	- losetup set up the device in two ioctl:
      		  LOOP_SET_FD and LOOP_SET_STATUS64.
      
      	- LOOP_SET_STATUS64 only update size of gendisk.
      
      Block device size will be updated lazily when device comes to use. If udev
      rushes in between the two ioctl, it will bring in a block device whose
      size is backing file size. If the device is not released after
      LOOP_SET_STATUS64 ioctl, blockdev will not see the updated size.
      
      Update block size in LOOP_SET_STATUS64 ioctl.
      Signed-off-by: NGuo Chao <yan@linux.vnet.ibm.com>
      Reported-by: NM. Hindess <hindessm@uk.ibm.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Guo Chao <yan@linux.vnet.ibm.com>
      Cc: Nikanth Karthikesan <knikanth@suse.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      541c742a
    • G
      loopdev: fix a deadlock · 5370019d
      Guo Chao 提交于
      bd_mutex and lo_ctl_mutex can be held in different order.
      
      Path #1:
      
      blkdev_open
       blkdev_get
        __blkdev_get (hold bd_mutex)
         lo_open (hold lo_ctl_mutex)
      
      Path #2:
      
      blkdev_ioctl
       lo_ioctl (hold lo_ctl_mutex)
        lo_set_capacity (hold bd_mutex)
      
      Lockdep does not report it, because path #2 actually holds a subclass of
      lo_ctl_mutex.  This subclass seems creep into the code by mistake.  The
      patch author actually just mentioned it in the changelog, see commit
      f028f3b2 ("loop: fix circular locking in loop_clr_fd()"), also see:
      
      	http://marc.info/?l=linux-kernel&m=123806169129727&w=2
      
      Path #2 hold bd_mutex to call bd_set_size(), I've protected it
      with i_mutex in a previous patch, so drop bd_mutex at this site.
      Signed-off-by: NGuo Chao <yan@linux.vnet.ibm.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Guo Chao <yan@linux.vnet.ibm.com>
      Cc: M. Hindess <hindessm@uk.ibm.com>
      Cc: Nikanth Karthikesan <knikanth@suse.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      5370019d
    • C
      drivers/block/swim3.c: fix null pointer dereference · 7414d4f6
      Cong Ding 提交于
      The use of pointer fs should be after the null check.
      Signed-off-by: NCong Ding <dinggnu@gmail.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      7414d4f6
  12. 20 2月, 2013 1 次提交