You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe:
"Here's the second round of block updates for this merge window.
It's a mix of fixes for changes that went in previously in this round,
and fixes in general. This pull request contains:
- Fixes for loop from Christoph
- A bdi vs gendisk lifetime fix from Dan, worth two cookies.
- A blk-mq timeout fix, when on frozen queues. From Gabriel.
- Writeback fix from Jan, ensuring that __writeback_single_inode()
does the right thing.
- Fix for bio->bi_rw usage in f2fs from me.
- Error path deadlock fix in blk-mq sysfs registration from me.
- Floppy O_ACCMODE fix from Jiri.
- Fix to the new bio op methods from Mike.
One more followup will be coming here, ensuring that we don't
propagate the block types outside of block. That, and a rename of
bio->bi_rw is coming right after -rc1 is cut.
- Various little fixes"
* 'for-linus' of git://git.kernel.dk/linux-block:
mm/block: convert rw_page users to bio op use
loop: make do_req_filebacked more robust
loop: don't try to use AIO for discards
blk-mq: fix deadlock in blk_mq_register_disk() error path
Include: blkdev: Removed duplicate 'struct request;' declaration.
Fixup direct bi_rw modifiers
block: fix bdi vs gendisk lifetime mismatch
blk-mq: Allow timeouts to run while queue is freezing
nbd: fix race in ioctl
block: fix use-after-free in seq file
f2fs: drop bio->bi_rw manual assignment
block: add missing group association in bio-cloning functions
blkcg: kill unused field nr_undestroyed_grps
writeback: Write dirty times for WB_SYNC_ALL writeback
floppy: fix open(O_ACCMODE) for ioctl-only open
This commit is contained in:
+4
-3
@@ -416,7 +416,8 @@ int bdev_read_page(struct block_device *bdev, sector_t sector,
|
||||
result = blk_queue_enter(bdev->bd_queue, false);
|
||||
if (result)
|
||||
return result;
|
||||
result = ops->rw_page(bdev, sector + get_start_sect(bdev), page, READ);
|
||||
result = ops->rw_page(bdev, sector + get_start_sect(bdev), page,
|
||||
REQ_OP_READ);
|
||||
blk_queue_exit(bdev->bd_queue);
|
||||
return result;
|
||||
}
|
||||
@@ -445,7 +446,6 @@ int bdev_write_page(struct block_device *bdev, sector_t sector,
|
||||
struct page *page, struct writeback_control *wbc)
|
||||
{
|
||||
int result;
|
||||
int rw = (wbc->sync_mode == WB_SYNC_ALL) ? WRITE_SYNC : WRITE;
|
||||
const struct block_device_operations *ops = bdev->bd_disk->fops;
|
||||
|
||||
if (!ops->rw_page || bdev_get_integrity(bdev))
|
||||
@@ -455,7 +455,8 @@ int bdev_write_page(struct block_device *bdev, sector_t sector,
|
||||
return result;
|
||||
|
||||
set_page_writeback(page);
|
||||
result = ops->rw_page(bdev, sector + get_start_sect(bdev), page, rw);
|
||||
result = ops->rw_page(bdev, sector + get_start_sect(bdev), page,
|
||||
REQ_OP_WRITE);
|
||||
if (result)
|
||||
end_page_writeback(page);
|
||||
else
|
||||
|
||||
@@ -2049,7 +2049,7 @@ int repair_io_failure(struct inode *inode, u64 start, u64 length, u64 logical,
|
||||
return -EIO;
|
||||
}
|
||||
bio->bi_bdev = dev->bdev;
|
||||
bio->bi_rw = WRITE_SYNC;
|
||||
bio_set_op_attrs(bio, REQ_OP_WRITE, WRITE_SYNC);
|
||||
bio_add_page(bio, page, length, pg_offset);
|
||||
|
||||
if (btrfsic_submit_bio_wait(bio)) {
|
||||
@@ -2697,12 +2697,6 @@ struct bio *btrfs_bio_clone(struct bio *bio, gfp_t gfp_mask)
|
||||
btrfs_bio->csum = NULL;
|
||||
btrfs_bio->csum_allocated = NULL;
|
||||
btrfs_bio->end_io = NULL;
|
||||
|
||||
#ifdef CONFIG_BLK_CGROUP
|
||||
/* FIXME, put this into bio_clone_bioset */
|
||||
if (bio->bi_css)
|
||||
bio_associate_blkcg(new, bio->bi_css);
|
||||
#endif
|
||||
}
|
||||
return new;
|
||||
}
|
||||
|
||||
@@ -245,7 +245,6 @@ int f2fs_submit_page_bio(struct f2fs_io_info *fio)
|
||||
bio_put(bio);
|
||||
return -EFAULT;
|
||||
}
|
||||
bio->bi_rw = fio->op_flags;
|
||||
bio_set_op_attrs(bio, fio->op, fio->op_flags);
|
||||
|
||||
__submit_bio(fio->sbi, bio, fio->type);
|
||||
|
||||
@@ -1327,6 +1327,7 @@ __writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
|
||||
dirty = inode->i_state & I_DIRTY;
|
||||
if (inode->i_state & I_DIRTY_TIME) {
|
||||
if ((dirty & (I_DIRTY_SYNC | I_DIRTY_DATASYNC)) ||
|
||||
wbc->sync_mode == WB_SYNC_ALL ||
|
||||
unlikely(inode->i_state & I_DIRTY_TIME_EXPIRED) ||
|
||||
unlikely(time_after(jiffies,
|
||||
(inode->dirtied_time_when +
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ static void mpage_end_io(struct bio *bio)
|
||||
|
||||
bio_for_each_segment_all(bv, bio, i) {
|
||||
struct page *page = bv->bv_page;
|
||||
page_endio(page, bio_data_dir(bio), bio->bi_error);
|
||||
page_endio(page, bio_op(bio), bio->bi_error);
|
||||
}
|
||||
|
||||
bio_put(bio);
|
||||
|
||||
Reference in New Issue
Block a user