History

Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block updates from Jens Axboe: "This is a bit bigger than it should be, but I could (did) not want to send it off last week due to both wanting extra testing, and expecting a fix for the bounce regression as well. In any case, this contains: - Fix for the blk-merge.c compilation warning on gcc 5.x from me. - A set of back/front SG gap merge fixes, from me and from Sagi. This ensures that we honor SG gapping for integrity payloads as well. - Two small fixes for null_blk from Matias, fixing a leak and a capacity propagation issue. - A blkcg fix from Tejun, fixing a NULL dereference. - A fast clone optimization from Ming, fixing a performance regression since the arbitrarily sized bio's were introduced. - Also from Ming, a regression fix for bouncing IOs" * 'for-linus' of git://git.kernel.dk/linux-block: block: fix bounce_end_io block: blk-merge: fast-clone bio when splitting rw bios block: blkg_destroy_all() should clear q->root_blkg and ->root_rl.blkg block: Copy a user iovec if it includes gaps block: Refuse adding appending a gapped integrity page to a bio block: Refuse request/bio merges with gaps in the integrity payload block: Check for gaps on front and back merges null_blk: fix wrong capacity when bs is not 512 bytes null_blk: fix memory leak on cleanup block: fix bogus compiler warnings in blk-merge.c

Linus Torvalds committed 11 years ago

Commit 133bb592 parents 590dca3 99451878 files · +129 −57Browse files

Showing the changes to include/linux/blkdev.h (1 of 8 files). Show all

Unified · Split

include/linux/blkdev.h+50−0
@@ -1368,6 +1368,26 @@ static inline bool bvec_gap_to_prev(struct request_queue *q, · 1367 unmodified lines
1368 ((bprv->bv_offset + bprv->bv_len) & queue_virt_boundary(q));1368 ((bprv->bv_offset + bprv->bv_len) & queue_virt_boundary(q));
1369}1369}
1370 1370
1371static inline bool bio_will_gap(struct request_queue *q, struct bio *prev,
1372 struct bio *next)
1373{
1374 if (!bio_has_data(prev))
1375 return false;
1376
1377 return bvec_gap_to_prev(q, &prev->bi_io_vec[prev->bi_vcnt - 1],
1378 next->bi_io_vec[0].bv_offset);
1379}
1380
1381static inline bool req_gap_back_merge(struct request *req, struct bio *bio)
1382{
1383 return bio_will_gap(req->q, req->biotail, bio);
1384}
1385
1386static inline bool req_gap_front_merge(struct request *req, struct bio *bio)
1387{
1388 return bio_will_gap(req->q, bio, req->bio);
1389}
1390
1371struct work_struct;1391struct work_struct;
1372int kblockd_schedule_work(struct work_struct *work);1392int kblockd_schedule_work(struct work_struct *work);
1373int kblockd_schedule_delayed_work(struct delayed_work *dwork, unsigned long delay);1393int kblockd_schedule_delayed_work(struct delayed_work *dwork, unsigned long delay);
@@ -1494,6 +1514,26 @@ queue_max_integrity_segments(struct request_queue *q) · 120 unmodified lines
1494 return q->limits.max_integrity_segments;1514 return q->limits.max_integrity_segments;
1495}1515}
1496 1516
1517static inline bool integrity_req_gap_back_merge(struct request *req,
1518 struct bio *next)
1519{
1520 struct bio_integrity_payload *bip = bio_integrity(req->bio);
1521 struct bio_integrity_payload *bip_next = bio_integrity(next);
1522
1523 return bvec_gap_to_prev(req->q, &bip->bip_vec[bip->bip_vcnt - 1],
1524 bip_next->bip_vec[0].bv_offset);
1525}
1526
1527static inline bool integrity_req_gap_front_merge(struct request *req,
1528 struct bio *bio)
1529{
1530 struct bio_integrity_payload *bip = bio_integrity(bio);
1531 struct bio_integrity_payload *bip_next = bio_integrity(req->bio);
1532
1533 return bvec_gap_to_prev(req->q, &bip->bip_vec[bip->bip_vcnt - 1],
1534 bip_next->bip_vec[0].bv_offset);
1535}
1536
1497#else /* CONFIG_BLK_DEV_INTEGRITY */1537#else /* CONFIG_BLK_DEV_INTEGRITY */
1498 1538
1499struct bio;1539struct bio;
@@ -1560,6 +1600,16 @@ static inline bool blk_integrity_is_initialized(struct gendisk *g) · 60 unmodified lines
1560{1600{
1561 return 0;1601 return 0;
1562}1602}
1603static inline bool integrity_req_gap_back_merge(struct request *req,
1604 struct bio *next)
1605{
1606 return false;
1607}
1608static inline bool integrity_req_gap_front_merge(struct request *req,
1609 struct bio *bio)
1610{
1611 return false;
1612}
1563 1613
1564#endif /* CONFIG_BLK_DEV_INTEGRITY */1614#endif /* CONFIG_BLK_DEV_INTEGRITY */
1565 1615

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t