History

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

Linus Torvalds committed 10 years ago

Commit fff648d2 parents 62e6e9b abf545426 files · +168 −136Browse files

Showing the changes to include (7 of 26 files). Show all

Unified · Split

7 files
  1. include/linux/backing-dev-defs.h +1 −0
  2. include/linux/backing-dev.h +1 −0
  3. include/linux/bio.h +3 −0
  4. include/linux/blk_types.h +11 −11
  5. include/linux/blkdev.h +1 −2
  6. include/linux/fs.h +2 −1
  7. include/linux/pagemap.h +1 −1
include/linux/backing-dev-defs.h+1−0
@@ -163,6 +163,7 @@ struct backing_dev_info { · 162 unmodified lines
163163 wait_queue_head_t wb_waitq;
164164
165165 struct device *dev;
166+ struct device *owner;
166167
167168 struct timer_list laptop_mode_wb_timer;
168169
include/linux/backing-dev.h+1−0
@@ -24,6 +24,7 @@ __printf(3, 4) · 23 unmodified lines
2424 int bdi_register(struct backing_dev_info *bdi, struct device *parent,
2525 const char *fmt, ...);
2626 int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev);
27+int bdi_register_owner(struct backing_dev_info *bdi, struct device *owner);
2728 void bdi_unregister(struct backing_dev_info *bdi);
2829
2930 int __must_check bdi_setup_and_register(struct backing_dev_info *, char *);
include/linux/bio.h+3−0
@@ -470,11 +470,14 @@ extern unsigned int bvec_nr_vecs(unsigned short idx); · 469 unmodified lines
470470 int bio_associate_blkcg(struct bio *bio, struct cgroup_subsys_state *blkcg_css);
471471 int bio_associate_current(struct bio *bio);
472472 void bio_disassociate_task(struct bio *bio);
473+void bio_clone_blkcg_association(struct bio *dst, struct bio *src);
473474 #else /* CONFIG_BLK_CGROUP */
474475 static inline int bio_associate_blkcg(struct bio *bio,
475476 struct cgroup_subsys_state *blkcg_css) { return 0; }
476477 static inline int bio_associate_current(struct bio *bio) { return -ENOENT; }
477478 static inline void bio_disassociate_task(struct bio *bio) { }
479+static inline void bio_clone_blkcg_association(struct bio *dst,
480+ struct bio *src) { }
478481 #endif /* CONFIG_BLK_CGROUP */
479482
480483 #ifdef CONFIG_HIGHMEM
include/linux/blk_types.h+11−11
@@ -18,6 +18,17 @@ struct cgroup_subsys_state; · 17 unmodified lines
1818 typedef void (bio_end_io_t) (struct bio *);
1919 typedef void (bio_destructor_t) (struct bio *);
2020
21+enum req_op {
22+ REQ_OP_READ,
23+ REQ_OP_WRITE,
24+ REQ_OP_DISCARD, /* request to discard sectors */
25+ REQ_OP_SECURE_ERASE, /* request to securely erase sectors */
26+ REQ_OP_WRITE_SAME, /* write same block many times */
27+ REQ_OP_FLUSH, /* request for cache flush */
28+};
29+
30+#define REQ_OP_BITS 3
31+
2132 #ifdef CONFIG_BLOCK
2233 /*
2334 * main unit of I/O for the block layer and lower layers (ie drivers and
@@ -228,17 +239,6 @@ enum rq_flag_bits { · 204 unmodified lines
228239 #define REQ_HASHED (1ULL << __REQ_HASHED)
229240 #define REQ_MQ_INFLIGHT (1ULL << __REQ_MQ_INFLIGHT)
230241
231−enum req_op {
232− REQ_OP_READ,
233− REQ_OP_WRITE,
234− REQ_OP_DISCARD, /* request to discard sectors */
235− REQ_OP_SECURE_ERASE, /* request to securely erase sectors */
236− REQ_OP_WRITE_SAME, /* write same block many times */
237− REQ_OP_FLUSH, /* request for cache flush */
238−};
239−
240−#define REQ_OP_BITS 3
241−
242242 typedef unsigned int blk_qc_t;
243243 #define BLK_QC_T_NONE -1U
244244 #define BLK_QC_T_SHIFT 16
include/linux/blkdev.h+1−2
@@ -47,7 +47,6 @@ struct pr_ops; · 46 unmodified lines
4747 */
4848 #define BLKCG_MAX_POLS 2
4949
50−struct request;
5150 typedef void (rq_end_io_fn)(struct request *, int);
5251
5352 #define BLK_RL_SYNCFULL (1U << 0)
@@ -1673,7 +1672,7 @@ struct blk_dax_ctl { · 1619 unmodified lines
16731672 struct block_device_operations {
16741673 int (*open) (struct block_device *, fmode_t);
16751674 void (*release) (struct gendisk *, fmode_t);
1676− int (*rw_page)(struct block_device *, sector_t, struct page *, int rw);
1675+ int (*rw_page)(struct block_device *, sector_t, struct page *, int op);
16771676 int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
16781677 int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
16791678 long (*direct_access)(struct block_device *, sector_t, void **, pfn_t *,
include/linux/fs.h+2−1
@@ -2480,12 +2480,13 @@ extern void init_special_inode(struct inode *, umode_t, dev_t); · 2479 unmodified lines
24802480 extern void make_bad_inode(struct inode *);
24812481 extern bool is_bad_inode(struct inode *);
24822482
2483−#ifdef CONFIG_BLOCK
24842483 static inline bool op_is_write(unsigned int op)
24852484 {
24862485 return op == REQ_OP_READ ? false : true;
24872486 }
24882487
2488+#ifdef CONFIG_BLOCK
2489+
24892490 /*
24902491 * return data direction, READ or WRITE
24912492 */
include/linux/pagemap.h+1−1
@@ -510,7 +510,7 @@ static inline void wait_on_page_writeback(struct page *page) · 509 unmodified lines
510510 extern void end_page_writeback(struct page *page);
511511 void wait_for_stable_page(struct page *page);
512512
513−void page_endio(struct page *page, int rw, int err);
513+void page_endio(struct page *page, int op, int err);
514514
515515 /*
516516 * Add an arbitrary waiter to a page's wait queue

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