aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-11-10bcache: Remove unnecessary check in should_split()Kent Overstreet1-3/+2
Checking i->seq was redundant, because since ages ago we always initialize the new bset when advancing b->written Signed-off-by: Kent Overstreet <[email protected]>
2013-11-10bcache: Stripe size isn't necessarily a power of twoKent Overstreet5-25/+27
Originally I got this right... except that the divides didn't use do_div(), which broke 32 bit kernels. When I went to fix that, I forgot that the raid stripe size usually isn't a power of two... doh Signed-off-by: Kent Overstreet <[email protected]>
2013-11-10bcache: Add on error panic/unregister settingKent Overstreet4-5/+35
Works kind of like the ext4 setting, to panic or remount read only on errors. Signed-off-by: Kent Overstreet <[email protected]>
2013-11-10bcache: Use blkdev_issue_discard()Kent Overstreet3-117/+11
The old asynchronous discard code was really a relic from when all the allocation code was asynchronous - now that allocation runs out of a dedicated thread there's no point in keeping around all that complicated machinery. Signed-off-by: Kent Overstreet <[email protected]>
2013-11-10bcache: Fix a lockdep splatKent Overstreet1-1/+1
bch_keybuf_del() takes a spinlock that can't be taken in interrupt context - whoops. Fortunately, this code isn't enabled by default (you have to toggle a sysfs thing). Signed-off-by: Kent Overstreet <[email protected]>
2013-11-10bcache: Fix a journalling performance bugKent Overstreet2-22/+28
2013-11-10bcache: Fix dirty_data accountingKent Overstreet1-4/+7
Dirty data accounting wasn't quite right - firstly, we were adding the key we're inserting after it could have merged with another dirty key already in the btree, and secondly we could sometimes pass the wrong offset to bcache_dev_sectors_dirty_add() for dirty data we were overwriting - which is important when tracking dirty data by stripe. Signed-off-by: Kent Overstreet <[email protected]> Cc: linux-stable <[email protected]> # >= v3.10
2013-11-08floppy: Correct documentation of driver options when used as a module.Ben Harris1-3/+3
The options have to be passed space-separated and prefixed by "floppy=", rather than separately and unprefixed. This fixes <http://bugs.debian.org/726655>. Signed-off-by: Ben Harris <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-11-08pktcdvd: debugfs functions return NULL on errorDan Carpenter1-18/+4
My static checker complains correctly that this is potential NULL dereference because debugfs functions return NULL on error. They return an ERR_PTR if they are configured out. We don't need to check for ERR_PTR because if debugfs is stubbed out the dummy functions won't complain about that. We don't need to check the values before calling debugfs_remove() because that accepts ERR_PTRs and NULL pointers. We don't need to set pkt->dfs_f_info to NULL in pkt_debugfs_dev_new() because it was initialized with kzalloc() so I have removed that. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-11-08xen-blkfront: restore the non-persistent data pathRoger Pau Monne1-25/+100
When persistent grants were added they were always used, even if the backend doesn't have this feature (there's no harm in always using the same set of pages). This restores the old data path when the backend doesn't have persistent grants, removing the burden of doing a memcpy when it is not actually needed. Signed-off-by: Roger Pau Monné <[email protected]> Reported-by: Felipe Franciosi <[email protected]> Cc: Felipe Franciosi <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: David Vrabel <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> [v2: Fix up whitespace issues]
2013-11-08skd: fix formatting in skd_s1120.hBartlomiej Zolnierkiewicz1-120/+110
Cc: Akhil Bhansali <[email protected]> Cc: Jeff Moyer <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: reorder construct/destruct codeBartlomiej Zolnierkiewicz1-164/+141
Reorder placement of skd_construct(), skd_cons_sg_list(), skd_destruct() and skd_free_sg_list() functions. Then remove no longer needed function prototypes. Cc: Akhil Bhansali <[email protected]> Cc: Jeff Moyer <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: cleanup skd_do_inq_page_da()Bartlomiej Zolnierkiewicz1-26/+13
skdev->pdev and skdev->pdev->bus are always different than NULL in skd_do_inq_page_da() so simplify the code accordingly. Also cache skdev->pdev value in pdev variable while at it. Cc: Akhil Bhansali <[email protected]> Cc: Jeff Moyer <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: remove SKD_OMIT_FROM_SRC_DIST ifdefsBartlomiej Zolnierkiewicz1-14/+0
SKD_OMIT_FROM_SRC_DIST is never defined. Cc: Akhil Bhansali <[email protected]> Cc: Jeff Moyer <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: remove redundant skdev->pdev assignment from skd_pci_probe()Bartlomiej Zolnierkiewicz1-1/+1
skdev->pdev is set to pdev twice in skd_pci_probe(), first time through skd_construct() call and the second time directly in the function. Remove the second assignment as it is not needed. Cc: Akhil Bhansali <[email protected]> Cc: Jeff Moyer <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: use <asm/unaligned.h>Bartlomiej Zolnierkiewicz1-1/+1
Use <asm/unaligned.h> instead of <asm-generic/unaligned.h>. Cc: Akhil Bhansali <[email protected]> Cc: Jeff Moyer <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: remove SCSI subsystem specific includesBartlomiej Zolnierkiewicz1-3/+0
This is not a SCSI host driver so remove SCSI subsystem specific includes. Cc: Akhil Bhansali <[email protected]> Cc: Jeff Moyer <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: register block device only if some devices are presentBartlomiej Zolnierkiewicz1-21/+12
Register block device in skd_pci_probe() instead of in skd_init() so it is registered only if some devices are present (currently it is always registered when the driver is loaded). Please note that this change depends on the fact that register_blkdev(0, ...) never returns 0. Cc: Akhil Bhansali <[email protected]> Cc: Jeff Moyer <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: fix error messages in skd_init()Bartlomiej Zolnierkiewicz1-12/+9
* change priority level from KERN_INFO to KERN_ERR * add "skd: " prefix * do minor CodingStyle fixes Cc: Akhil Bhansali <[email protected]> Cc: Jeff Moyer <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: fix error paths in skd_init()Bartlomiej Zolnierkiewicz1-3/+13
Cc: Akhil Bhansali <[email protected]> Cc: Jeff Moyer <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: fix unregister_blkdev() placementBartlomiej Zolnierkiewicz1-1/+1
register_blkdev() is called before pci_register_driver() in skd_init() so unregister_blkdev() should be called after pci_unregister_driver() in skd_exit(). Fix it. Cc: Akhil Bhansali <[email protected]> Cc: Jeff Moyer <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: more removal of bio-based codeMike Snitzer1-71/+20
Remove skd_flush_cmd structure and skd_flush_slab. Remove skd_end_request wrapper around skd_end_request_blk. Remove skd_requeue_request, use blk_requeue_request directly. Cleanup some comments (remove "bio" info) and whitespace. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: cleanup the skd_*() function block wrappingJens Axboe1-37/+15
Just call the block functions directly, don't wrap them in skd helpers. With only one queueing model enabled, there's no point in doing that. Also kill the ->start_time and ->bio from the skd_request_context, we don't use those anymore. Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: rip out bio pathJens Axboe1-467/+62
The skd driver has a selectable rq or bio based queueing model. For 3.14, we want to turn this into a single blk-mq interface instead. With the immutable biovecs being merged in 3.13, the bio model would need patches to even work. So rip it out, with a conversion pending for blk-mq in the next release. Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: fix error return code in skd_pci_probe()Wei Yongjun1-1/+3
Fix to return -ENOMEM in the skd construct error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08s390/dasd: hold request queue sysfs lock when calling elevator_init()Heiko Carstens1-4/+4
"elevator: Fix a race in elevator switching and md device initialization" changed the semantics of elevator_init() in a way that now enforces to hold the corresponding request queue's sysfs_lock when calling elevator_init() to fix a race. The patch did not convert the s390 dasd device driver which is the only device driver which also calls elevator_init(). So add the missing locking. Cc: Tomoki Sekiyama <[email protected]> Cc: Jens Axboe <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08cciss: return 0 from driver probe function on success, not 1Stephen M. Cameron1-1/+1
A return value of 1 is interpreted as an error Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: Replaced custom debug PRINTKs with pr_debugrchinthekindi1-284/+407
Replaced DPRINTK() and VPRINTK() with pr_debug(). Signed-off-by: Ramprasad C <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08skd: Fix checkpatch ERRORS and removed unused functionsAkhil Bhansali1-22/+31
This patch fixes checkpatch.pl errors for assignment in if condition. It also removes unused readq / readl function calls. As Andrew had disabled the compilation of drivers for 32 bit, I have modified format specifiers in few VPRINTKs to avoid warnings during 64 bit compilation. Signed-off-by: Akhil Bhansali <[email protected]> Reviewed-by: Ramprasad Chinthekindi <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08rsxx: Fix possible kernel panic with invalid config.Philip J Kelleher2-4/+6
This patch fixes a possible Kernel Panic on driver load if the configuration on the card is messed up or not yet set. The driver could possible give a 32 bit unsigned all Fs to the kernel as the device's block size. Now we only write the block size to the kernel if the configuration from the card is valid. Also, driver version is being updated. Signed-off-by: Philip J Kelleher <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08rsxx: Disallow discards from being unmapped.Philip J Kelleher2-12/+17
This patch fixes a bug in which discards were always calling pci_unmap_page. Discards should never call the pci_unmap_page function call because they are never mapped. This caused a race condition on PowerPC systems when issuing discards, writes, and reads all at the same time. The pci_map_page function would eventually map logical address 0 for a read or write. Discards are always assigned a DMA address of 0 because they are never mapped. So if pci_map_page mapped address 0 for a DMA and a discard was "unmapped" then the address would be freed and would cause an EEH event to occur when Hardware accesses the address. This was injected/uncovered in commit: b347f9cf0bc8d42ee95ba1d3837fd93045ab336b The pci_dma_mapping_error function declares -1 a DMA_ERROR not 0 like initially thought So before we would never unmap discards because they were considered NULL. This patch should fall on top of commit id: fc1967bb08a6184ed44ef990e1dd4389901b809c Also, the driver version is being up dated. Signed-off-by: Philip J Kelleher <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08drbd: avoid to shrink max_bio_size due to peer re-configurationLars Ellenberg2-2/+5
For a long time, the receiving side has spread "too large" incoming requests over multiple bios. No need to shrink our max_bio_size (max_hw_sectors) if the peer is reconfigured to use a different storage. The problem manifests itself if we are not the top of the device stack (DRBD is used a LVM PV). A hardware reconfiguration on the peer may cause the supported max_bio_size to shrink, and the connection handshake would now unnecessarily shrink the max_bio_size on the active node. There is no way to notify upper layers that they have to "re-stack" their limits. So they won't notice at all, and may keep submitting bios that are suddenly considered "too large for device". We already check for compatibility and ignore changes on the peer, the code only was masked out unless we have a fully established connection. We just need to allow it a bit earlier during the handshake. Also consider max_hw_sectors in our merge bvec function, just in case. Signed-off-by: Philipp Reisner <[email protected]> Signed-off-by: Lars Ellenberg <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08drbd: fix decoding of bitmap vli rle for device sizes > 64 TBLars Ellenberg1-1/+5
Symptoms: disconnect after bitmap exchange due to bitmap overflow (e:49731075554) while decoding bm RLE packet In the decoding step of the variable length integer run length encoding there was potentially an uncatched bitshift by wordsize (variable >> 64). The result of which is "undefined" :( (only "sometimes" the result is the desired 0) Fix: don't do any bit shift magic for shift == 64, just assign. Signed-off-by: Philipp Reisner <[email protected]> Signed-off-by: Lars Ellenberg <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08drbd: Fix adding of new minors with freshly created meta dataPhilipp Reisner2-2/+3
Online adding of new minors with freshly created meta data to an resource with an established connection failed, with a wrong state transition on one side on one side of the new minor. Freshly created meta-data has a la_size (last agreed size) of 0. When we online add such devices, the code wrongly got into the code path for resyncing new storage that was added while the disk was detached. Fixed that by making the GREW from ZERO a special case. Signed-off-by: Philipp Reisner <[email protected]> Signed-off-by: Lars Ellenberg <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08drbd: Fix an connection drop issue after enabling allow-two-primariesPhilipp Reisner1-23/+16
Since drbd-8.4.0 it is possible to change the allow-two-primaries network option while the connection is established. The sequence code used to partially order packets from the data socket with packets from the meta-data socket, still assued that the allow-two-primaries option is constant while the connection is established. I.e. On a node that has the RESOLVE_CONFLICTS bits set, after enabling allow-two-primaries, when receiving the next data packet it timed out while waiting for the necessary packets on the data socket to arrive (wait_for_and_update_peer_seq() function). Fixed that by always tracking the sequence number, but only waiting for it if allow-two-primaries is set. Signed-off-by: Philipp Reisner <[email protected]> Signed-off-by: Lars Ellenberg <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08drbd: fix NULL pointer deref in module init error pathLars Ellenberg1-10/+9
If we want to iterate over the (as of yet still empty) list in the cleanup path, we need to initialize the list before the first goto fail. Signed-off-by: Philipp Reisner <[email protected]> Signed-off-by: Lars Ellenberg <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08block: disable cpqarray in KconfigJens Axboe1-1/+1
Mike writes: "cpqarray hasn't been used in over 12 years. It's doubtful that anyone still uses the board. It's time the driver was removed from the mainline kernel. The only updates these days are minor and mostly done by people outside of HP." If nobody yells, we'll remove it from the kernel tree completely for 3.15. Signed-off-by: Jens Axboe <[email protected]>
2013-11-08Add support for sTec's pci-e flash card KronosAkhil Bhansali4-0/+6183
Signed-off-by: Akhil Bhansali <[email protected]> Signed-off-by: Ramprasad Chinthekindi <[email protected]> Reviewed-by: Jeff Moyer <[email protected]> Folded patch, contributions to clean up this driver from: Jens Axboe Dan Carpenter Andrew Morton Signed-off-by: Jens Axboe <[email protected]>
2013-11-08rsxx: Kernel Panic caused by mapping DiscardsPhilip J Kelleher2-21/+24
This fixes a kernel panic injected by commit id 8d26750143341831bc312f61c5ed141eeb75b8d0 where discards are getting mapped through the pci_map_page function call. The driver will now start verifying that a dma is not a discard before issuing a the pci_map_page function call. Also, we are updating the driver version. Signed-off-by: Philip J Kelleher <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08mtip32xx: dynamically allocate buffer in debugfs functionsDavid Milburn1-10/+37
Dynamically allocate buf to prevent warnings: drivers/block/mtip32xx/mtip32xx.c: In function ‘mtip_hw_read_device_status’: drivers/block/mtip32xx/mtip32xx.c:2823: warning: the frame size of 1056 bytes is larger than 1024 bytes drivers/block/mtip32xx/mtip32xx.c: In function ‘mtip_hw_read_registers’: drivers/block/mtip32xx/mtip32xx.c:2894: warning: the frame size of 1056 bytes is larger than 1024 bytes drivers/block/mtip32xx/mtip32xx.c: In function ‘mtip_hw_read_flags’: drivers/block/mtip32xx/mtip32xx.c:2917: warning: the frame size of 1056 bytes is larger than 1024 bytes Signed-off-by: David Milburn <[email protected]> Acked-by: Asai Thambi S P <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08mtip32xx: Add SRSI supportAsai Thambi S P2-182/+289
This patch add support for SRSI(Surprise Removal Surprise Insertion). Approach: --------- Surprise Removal: ----------------- On surprise removal of the device, gendisk, request queue, device index, sysfs entries, etc are retained as long as device is in use - mounted filesystem, device opened by an application, etc. The service thread breaks out of the main while loop, waits for pci remove to exit, and then waits for device to become free. When there no holders of the device, service thread cleans up the block and device related stuff and returns. Surprise Insertion: ------------------- No change, this scenario follows the normal pci probe() function flow. Signed-off-by: Asai Thambi S P <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08rsxx: Moving pci_map_page to prevent overflow.Philip J Kelleher2-47/+28
The pci_map_page function has been moved into our issued workqueue to prevent an us running out of mappable addresses on non-HWWD PCIe x8 slots. The maximum amount that can possible be mapped at one time now is: 255 dmas X 4 dma channels X 4096 Bytes. Signed-off-by: Philip J Kelleher <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08rsxx: Handling failed pci_map_page on PowerPC and double free.Philip J Kelleher3-22/+37
The rsxx driver was not checking the correct value during a pci_map_page failure. Fixing this also uncovered a double free if the bio was returned before it was broken up into indiviadual 4k dmas, that is also fixed here. Signed-off-by: Philip J Kelleher <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08loop: fix crash when using unassigned loop deviceMikulas Patocka1-7/+8
When the loop module is loaded, it creates 8 loop devices /dev/loop[0-7]. The devices have no request routine and thus, when they are used without being assigned, a crash happens. For example, these commands cause crash (assuming there are no used loop devices): Kernel Fault: Code=26 regs=000000007f420980 (Addr=0000000000000010) CPU: 1 PID: 50 Comm: kworker/1:1 Not tainted 3.11.0 #1 Workqueue: ksnaphd do_metadata [dm_snapshot] task: 000000007fcf4078 ti: 000000007f420000 task.ti: 000000007f420000 [ 116.319988] YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI PSW: 00001000000001001111111100001111 Not tainted r00-03 000000ff0804ff0f 00000000408bf5d0 00000000402d8204 000000007b7ff6c0 r04-07 00000000408a95d0 000000007f420950 000000007b7ff6c0 000000007d06c930 r08-11 000000007f4205c0 0000000000000001 000000007f4205c0 000000007f4204b8 r12-15 0000000000000010 0000000000000000 0000000000000000 0000000000000000 r16-19 000000001108dd48 000000004061cd7c 000000007d859800 000000000800000f r20-23 0000000000000000 0000000000000008 0000000000000000 0000000000000000 r24-27 00000000ffffffff 000000007b7ff6c0 000000007d859800 00000000408a95d0 r28-31 0000000000000000 000000007f420950 000000007f420980 000000007f4208e8 sr00-03 0000000000000000 0000000000000000 0000000000000000 0000000000303000 sr04-07 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 117.549988] IASQ: 0000000000000000 0000000000000000 IAOQ: 00000000402d82fc 00000000402d8300 IIR: 53820020 ISR: 0000000000000000 IOR: 0000000000000010 CPU: 1 CR30: 000000007f420000 CR31: ffffffffffffffff ORIG_R28: 0000000000000001 IAOQ[0]: generic_make_request+0x11c/0x1a0 IAOQ[1]: generic_make_request+0x120/0x1a0 RP(r2): generic_make_request+0x24/0x1a0 Backtrace: [<00000000402d83f0>] submit_bio+0x70/0x140 [<0000000011087c4c>] dispatch_io+0x234/0x478 [dm_mod] [<0000000011087f44>] sync_io+0xb4/0x190 [dm_mod] [<00000000110883bc>] dm_io+0x2c4/0x310 [dm_mod] [<00000000110bfcd0>] do_metadata+0x28/0xb0 [dm_snapshot] [<00000000401591d8>] process_one_work+0x160/0x460 [<0000000040159bc0>] worker_thread+0x300/0x478 [<0000000040161a70>] kthread+0x118/0x128 [<0000000040104020>] end_fault_vector+0x20/0x28 [<0000000040177220>] task_tick_fair+0x420/0x4d0 [<00000000401aa048>] invoke_rcu_core+0x50/0x60 [<00000000401ad5b8>] rcu_check_callbacks+0x210/0x8d8 [<000000004014aaa0>] update_process_times+0xa8/0xc0 [<00000000401ab86c>] rcu_process_callbacks+0x4b4/0x598 [<0000000040142408>] __do_softirq+0x250/0x2c0 [<00000000401789d0>] find_busiest_group+0x3c0/0xc70 [ 119.379988] Kernel panic - not syncing: Kernel Fault Rebooting in 1 seconds.. Signed-off-by: Mikulas Patocka <[email protected]> Cc: [email protected] Signed-off-by: Jens Axboe <[email protected]>
2013-11-08xen/blkback: fix reference countingVegard Nossum1-1/+2
If the permission check fails, we drop a reference to the blkif without having taken it in the first place. The bug was introduced in commit 604c499cbbcc3d5fe5fb8d53306aa0fae1990109 (xen/blkback: Check device permissions before allowing OP_DISCARD). Cc: [email protected] Cc: Jan Beulich <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Vegard Nossum <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08xen-blkfront: improve aproximation of required grants per requestRoger Pau Monne1-4/+7
Improve the calculation of required grants to process a request by using nr_phys_segments instead of always assuming a request is going to use all posible segments. nr_phys_segments contains the number of scatter-gather DMA addr+len pairs, which is basically what we put at every granted page. for_each_sg iterates over the DMA addr+len pairs and uses a grant page for each of them. Signed-off-by: Roger Pau Monné <[email protected]> Reviewed-by: David Vrabel <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: David Vrabel <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08xen-blkfront: revoke foreign access for grants not mapped by the backendRoger Pau Monne1-4/+29
There's no need to keep the foreign access in a grant if it is not persistently mapped by the backend. This allows us to free grants that are not mapped by the backend, thus preventing blkfront from hoarding all grants. The main effect of this is that blkfront will only persistently map the same grants as the backend, and it will always try to use grants that are already mapped by the backend. Also the number of persistent grants in blkfront is the same as in blkback (and is controlled by the value in blkback). Signed-off-by: Roger Pau Monné <[email protected]> Reviewed-by: David Vrabel <[email protected]> Acked-by: Matt Wilson <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: David Vrabel <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08mg_disk: remove deprecated IRQF_DISABLEDMichael Opdenacker1-1/+1
This patch proposes to remove the use of the IRQF_DISABLED flag It's a NOOP since 2.6.35 and it will be removed one day. Signed-off-by: Michael Opdenacker <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERODuan Jiong1-1/+1
This patch fixes coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2013-11-08block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERODuan Jiong1-1/+1
This patch fixes coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong <[email protected]> Signed-off-by: Jens Axboe <[email protected]>