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
163 wait_queue_head_t wb_waitq;163 wait_queue_head_t wb_waitq;
164 164
165 struct device *dev;165 struct device *dev;
166 struct device *owner;
166 167
167 struct timer_list laptop_mode_wb_timer;168 struct timer_list laptop_mode_wb_timer;
168 169
include/linux/backing-dev.h+1−0
@@ -24,6 +24,7 @@ __printf(3, 4) · 23 unmodified lines
24int bdi_register(struct backing_dev_info *bdi, struct device *parent,24int bdi_register(struct backing_dev_info *bdi, struct device *parent,
25 const char *fmt, ...);25 const char *fmt, ...);
26int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev);26int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev);
27int bdi_register_owner(struct backing_dev_info *bdi, struct device *owner);
27void bdi_unregister(struct backing_dev_info *bdi);28void bdi_unregister(struct backing_dev_info *bdi);
28 29
29int __must_check bdi_setup_and_register(struct backing_dev_info *, char *);30int __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
470int bio_associate_blkcg(struct bio *bio, struct cgroup_subsys_state *blkcg_css);470int bio_associate_blkcg(struct bio *bio, struct cgroup_subsys_state *blkcg_css);
471int bio_associate_current(struct bio *bio);471int bio_associate_current(struct bio *bio);
472void bio_disassociate_task(struct bio *bio);472void bio_disassociate_task(struct bio *bio);
473void bio_clone_blkcg_association(struct bio *dst, struct bio *src);
473#else /* CONFIG_BLK_CGROUP */474#else /* CONFIG_BLK_CGROUP */
474static inline int bio_associate_blkcg(struct bio *bio,475static inline int bio_associate_blkcg(struct bio *bio,
475 struct cgroup_subsys_state *blkcg_css) { return 0; }476 struct cgroup_subsys_state *blkcg_css) { return 0; }
476static inline int bio_associate_current(struct bio *bio) { return -ENOENT; }477static inline int bio_associate_current(struct bio *bio) { return -ENOENT; }
477static inline void bio_disassociate_task(struct bio *bio) { }478static inline void bio_disassociate_task(struct bio *bio) { }
479static inline void bio_clone_blkcg_association(struct bio *dst,
480 struct bio *src) { }
478#endif /* CONFIG_BLK_CGROUP */481#endif /* CONFIG_BLK_CGROUP */
479 482
480#ifdef CONFIG_HIGHMEM483#ifdef CONFIG_HIGHMEM
include/linux/blk_types.h+11−11
@@ -18,6 +18,17 @@ struct cgroup_subsys_state; · 17 unmodified lines
18typedef void (bio_end_io_t) (struct bio *);18typedef void (bio_end_io_t) (struct bio *);
19typedef void (bio_destructor_t) (struct bio *);19typedef void (bio_destructor_t) (struct bio *);
20 20
21enum 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
21#ifdef CONFIG_BLOCK32#ifdef CONFIG_BLOCK
22/*33/*
23 * main unit of I/O for the block layer and lower layers (ie drivers and34 * 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
228#define REQ_HASHED (1ULL << __REQ_HASHED)239#define REQ_HASHED (1ULL << __REQ_HASHED)
229#define REQ_MQ_INFLIGHT (1ULL << __REQ_MQ_INFLIGHT)240#define REQ_MQ_INFLIGHT (1ULL << __REQ_MQ_INFLIGHT)
230 241
231enum 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
242typedef unsigned int blk_qc_t;242typedef unsigned int blk_qc_t;
243#define BLK_QC_T_NONE -1U243#define BLK_QC_T_NONE -1U
244#define BLK_QC_T_SHIFT 16244#define BLK_QC_T_SHIFT 16
include/linux/blkdev.h+1−2
@@ -47,7 +47,6 @@ struct pr_ops; · 46 unmodified lines
47 */47 */
48#define BLKCG_MAX_POLS 248#define BLKCG_MAX_POLS 2
49 49
50struct request;
51typedef void (rq_end_io_fn)(struct request *, int);50typedef void (rq_end_io_fn)(struct request *, int);
52 51
53#define BLK_RL_SYNCFULL (1U << 0)52#define BLK_RL_SYNCFULL (1U << 0)
@@ -1673,7 +1672,7 @@ struct blk_dax_ctl { · 1619 unmodified lines
1673struct block_device_operations {1672struct block_device_operations {
1674 int (*open) (struct block_device *, fmode_t);1673 int (*open) (struct block_device *, fmode_t);
1675 void (*release) (struct gendisk *, fmode_t);1674 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);
1677 int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);1676 int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
1678 int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);1677 int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
1679 long (*direct_access)(struct block_device *, sector_t, void **, pfn_t *,1678 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
2480extern void make_bad_inode(struct inode *);2480extern void make_bad_inode(struct inode *);
2481extern bool is_bad_inode(struct inode *);2481extern bool is_bad_inode(struct inode *);
2482 2482
2483#ifdef CONFIG_BLOCK
2484static inline bool op_is_write(unsigned int op)2483static inline bool op_is_write(unsigned int op)
2485{2484{
2486 return op == REQ_OP_READ ? false : true;2485 return op == REQ_OP_READ ? false : true;
2487}2486}
2488 2487
2488#ifdef CONFIG_BLOCK
2489
2489/*2490/*
2490 * return data direction, READ or WRITE2491 * return data direction, READ or WRITE
2491 */2492 */
include/linux/pagemap.h+1−1
@@ -510,7 +510,7 @@ static inline void wait_on_page_writeback(struct page *page) · 509 unmodified lines
510extern void end_page_writeback(struct page *page);510extern void end_page_writeback(struct page *page);
511void wait_for_stable_page(struct page *page);511void wait_for_stable_page(struct page *page);
512 512
513void page_endio(struct page *page, int rw, int err);513void page_endio(struct page *page, int op, int err);
514 514
515/*515/*
516 * Add an arbitrary waiter to a page's wait queue516 * 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