aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/xen-blkback/xenbus.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-15 15:48:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-15 15:48:41 -0500
commit16008d641670571ff4cd750b416c7caf2d89f467 (patch)
tree6dc32821bd4576106cee50d52a90a8106a9d481f /drivers/block/xen-blkback/xenbus.c
parentb3c9dd182ed3bdcdaf0e42625a35924b0497afdc (diff)
parent85a0f7b220777cd3c232fd2f079db5c4a874c4ee (diff)
Merge branch 'for-3.3/drivers' of git://git.kernel.dk/linux-block
* 'for-3.3/drivers' of git://git.kernel.dk/linux-block: mtip32xx: do rebuild monitoring asynchronously xen-blkfront: Use kcalloc instead of kzalloc to allocate array mtip32xx: uninitialized variable in mtip_quiesce_io() mtip32xx: updates based on feedback xen-blkback: convert hole punching to discard request on loop devices xen/blkback: Move processing of BLKIF_OP_DISCARD from dispatch_rw_block_io xen/blk[front|back]: Enhance discard support with secure erasing support. xen/blk[front|back]: Squash blkif_request_rw and blkif_request_discard together mtip32xx: update to new ->make_request() API mtip32xx: add module.h include to avoid conflict with moduleh tree mtip32xx: mark a few more items static mtip32xx: ensure that all local functions are static mtip32xx: cleanup compat ioctl handling mtip32xx: fix warnings/errors on 32-bit compiles block: Add driver for Micron RealSSD pcie flash cards
Diffstat (limited to 'drivers/block/xen-blkback/xenbus.c')
-rw-r--r--drivers/block/xen-blkback/xenbus.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c
index 37c794d31264..24a2fb57e5d0 100644
--- a/drivers/block/xen-blkback/xenbus.c
+++ b/drivers/block/xen-blkback/xenbus.c
@@ -338,6 +338,9 @@ static int xen_vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle,
338 if (q && q->flush_flags) 338 if (q && q->flush_flags)
339 vbd->flush_support = true; 339 vbd->flush_support = true;
340 340
341 if (q && blk_queue_secdiscard(q))
342 vbd->discard_secure = true;
343
341 DPRINTK("Successful creation of handle=%04x (dom=%u)\n", 344 DPRINTK("Successful creation of handle=%04x (dom=%u)\n",
342 handle, blkif->domid); 345 handle, blkif->domid);
343 return 0; 346 return 0;
@@ -420,6 +423,15 @@ int xen_blkbk_discard(struct xenbus_transaction xbt, struct backend_info *be)
420 state = 1; 423 state = 1;
421 blkif->blk_backend_type = BLKIF_BACKEND_PHY; 424 blkif->blk_backend_type = BLKIF_BACKEND_PHY;
422 } 425 }
426 /* Optional. */
427 err = xenbus_printf(xbt, dev->nodename,
428 "discard-secure", "%d",
429 blkif->vbd.discard_secure);
430 if (err) {
431 xenbus_dev_fatal(dev, err,
432 "writting discard-secure");
433 goto kfree;
434 }
423 } 435 }
424 } else { 436 } else {
425 err = PTR_ERR(type); 437 err = PTR_ERR(type);