]> Git Repo - linux.git/commitdiff
Merge branch 'stable/for-jens-3.16' of git://git.kernel.org/pub/scm/linux/kernel...
authorJens Axboe <[email protected]>
Wed, 28 May 2014 18:37:04 +0000 (12:37 -0600)
committerJens Axboe <[email protected]>
Wed, 28 May 2014 18:37:04 +0000 (12:37 -0600)
Konrad writes:

Please git pull the following branch:

git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git stable/for-jens-3.16

which has a bunch of fixes to the Xen block frontend and backend driver
and a new parameter for Xen backend driver - an override (set by the toolstack)
whether to expose the discard support (if disk of course supports it) or not.

1  2 
drivers/block/xen-blkfront.c

index 283a30e88287b6bbec1be6b683a87d52fc997b59,25c11ad3418450de1a59439f92dfb23a8b9512b7..5deb235bd18fe07adb2efb09a7c77508aadfaeec
@@@ -612,10 -612,10 +612,10 @@@ static void do_blkif_request(struct req
                }
  
                pr_debug("do_blk_req %p: cmd %p, sec %lx, "
 -                       "(%u/%u) buffer:%p [%s]\n",
 +                       "(%u/%u) [%s]\n",
                         req, req->cmd, (unsigned long)blk_rq_pos(req),
                         blk_rq_cur_sectors(req), blk_rq_sectors(req),
 -                       req->buffer, rq_data_dir(req) ? "write" : "read");
 +                       rq_data_dir(req) ? "write" : "read");
  
                if (blkif_queue_request(req)) {
                        blk_requeue_request(rq, req);
@@@ -1635,36 -1635,24 +1635,24 @@@ blkfront_closing(struct blkfront_info *
  static void blkfront_setup_discard(struct blkfront_info *info)
  {
        int err;
-       char *type;
        unsigned int discard_granularity;
        unsigned int discard_alignment;
        unsigned int discard_secure;
  
-       type = xenbus_read(XBT_NIL, info->xbdev->otherend, "type", NULL);
-       if (IS_ERR(type))
-               return;
-       info->feature_secdiscard = 0;
-       if (strncmp(type, "phy", 3) == 0) {
-               err = xenbus_gather(XBT_NIL, info->xbdev->otherend,
-                       "discard-granularity", "%u", &discard_granularity,
-                       "discard-alignment", "%u", &discard_alignment,
-                       NULL);
-               if (!err) {
-                       info->feature_discard = 1;
-                       info->discard_granularity = discard_granularity;
-                       info->discard_alignment = discard_alignment;
-               }
-               err = xenbus_gather(XBT_NIL, info->xbdev->otherend,
-                           "discard-secure", "%d", &discard_secure,
-                           NULL);
-               if (!err)
-                       info->feature_secdiscard = discard_secure;
-       } else if (strncmp(type, "file", 4) == 0)
-               info->feature_discard = 1;
-       kfree(type);
+       info->feature_discard = 1;
+       err = xenbus_gather(XBT_NIL, info->xbdev->otherend,
+               "discard-granularity", "%u", &discard_granularity,
+               "discard-alignment", "%u", &discard_alignment,
+               NULL);
+       if (!err) {
+               info->discard_granularity = discard_granularity;
+               info->discard_alignment = discard_alignment;
+       }
+       err = xenbus_gather(XBT_NIL, info->xbdev->otherend,
+                   "discard-secure", "%d", &discard_secure,
+                   NULL);
+       if (!err)
+               info->feature_secdiscard = !!discard_secure;
  }
  
  static int blkfront_setup_indirect(struct blkfront_info *info)
This page took 0.060478 seconds and 4 git commands to generate.