History

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

Pull block driver changes from Jens Axboe: "Nothing out of the ordinary here, this pull request contains: - A big round of fixes for bcache from Kent Overstreet, Slava Pestov, and Surbhi Palande. No new features, just a lot of fixes. - The usual round of drbd updates from Andreas Gruenbacher, Lars Ellenberg, and Philipp Reisner. - virtio_blk was converted to blk-mq back in 3.13, but now Ming Lei has taken it one step further and added support for actually using more than one queue. - Addition of an explicit SG_FLAG_Q_AT_HEAD for block/bsg, to compliment the the default behavior of adding to the tail of the queue. From Douglas Gilbert" * 'for-3.17/drivers' of git://git.kernel.dk/linux-block: (86 commits) bcache: Drop unneeded blk_sync_queue() calls bcache: add mutex lock for bch_is_open bcache: Correct printing of btree_gc_max_duration_ms bcache: try to set b->parent properly bcache: fix memory corruption in init error path bcache: fix crash with incomplete cache set bcache: Fix more early shutdown bugs bcache: fix use-after-free in btree_gc_coalesce() bcache: Fix an infinite loop in journal replay bcache: fix crash in bcache_btree_node_alloc_fail tracepoint bcache: bcache_write tracepoint was crashing bcache: fix typo in bch_bkey_equal_header bcache: Allocate bounce buffers with GFP_NOWAIT bcache: Make sure to pass GFP_WAIT to mempool_alloc() bcache: fix uninterruptible sleep in writeback thread bcache: wait for buckets when allocating new btree root bcache: fix crash on shutdown in passthrough mode bcache: fix lockdep warnings on shutdown bcache allocator: send discards with correct size bcache: Fix to remove the rcu_sched stalls. ...

Linus Torvalds committed 12 years ago

Commit d429a362 parents 4a319a4 99d540039 files · +2932 −1311Browse files

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

Unified · Split

7 files
  1. include/linux/drbd.h +2 −2
  2. include/linux/drbd_genl.h +4 −0
  3. include/linux/drbd_limits.h +6 −0
  4. include/scsi/sg.h +3 −1
  5. include/trace/events/bcache.h +12 −9
  6. include/uapi/linux/bsg.h +6 −5
  7. include/uapi/linux/virtio_blk.h +5 −0
include/linux/drbd.h+2−2
@@ -52,7 +52,7 @@ · 51 unmodified lines
52#endif52#endif
53 53
54extern const char *drbd_buildtag(void);54extern const char *drbd_buildtag(void);
55#define REL_VERSION "8.4.3"55#define REL_VERSION "8.4.5"
56#define API_VERSION 156#define API_VERSION 1
57#define PRO_VERSION_MIN 8657#define PRO_VERSION_MIN 86
58#define PRO_VERSION_MAX 10158#define PRO_VERSION_MAX 101
@@ -245,7 +245,7 @@ enum drbd_disk_state { · 186 unmodified lines
245 D_DISKLESS,245 D_DISKLESS,
246 D_ATTACHING, /* In the process of reading the meta-data */246 D_ATTACHING, /* In the process of reading the meta-data */
247 D_FAILED, /* Becomes D_DISKLESS as soon as we told it the peer */247 D_FAILED, /* Becomes D_DISKLESS as soon as we told it the peer */
248 /* when >= D_FAILED it is legal to access mdev->bc */248 /* when >= D_FAILED it is legal to access mdev->ldev */
249 D_NEGOTIATING, /* Late attaching state, we need to talk to the peer */249 D_NEGOTIATING, /* Late attaching state, we need to talk to the peer */
250 D_INCONSISTENT,250 D_INCONSISTENT,
251 D_OUTDATED,251 D_OUTDATED,
include/linux/drbd_genl.h+4−0
@@ -171,6 +171,10 @@ GENL_struct(DRBD_NLA_NET_CONF, 5, net_conf, · 170 unmodified lines
171 __flg_field(28, DRBD_GENLA_F_MANDATORY | DRBD_F_INVARIANT, tentative)171 __flg_field(28, DRBD_GENLA_F_MANDATORY | DRBD_F_INVARIANT, tentative)
172 __flg_field_def(29, DRBD_GENLA_F_MANDATORY, use_rle, DRBD_USE_RLE_DEF)172 __flg_field_def(29, DRBD_GENLA_F_MANDATORY, use_rle, DRBD_USE_RLE_DEF)
173 /* 9: __u32_field_def(30, DRBD_GENLA_F_MANDATORY, fencing_policy, DRBD_FENCING_DEF) */173 /* 9: __u32_field_def(30, DRBD_GENLA_F_MANDATORY, fencing_policy, DRBD_FENCING_DEF) */
174 /* 9: __str_field_def(31, DRBD_GENLA_F_MANDATORY, name, SHARED_SECRET_MAX) */
175 /* 9: __u32_field(32, DRBD_F_REQUIRED | DRBD_F_INVARIANT, peer_node_id) */
176 __flg_field_def(33, 0 /* OPTIONAL */, csums_after_crash_only, DRBD_CSUMS_AFTER_CRASH_ONLY_DEF)
177 __u32_field_def(34, 0 /* OPTIONAL */, sock_check_timeo, DRBD_SOCKET_CHECK_TIMEO_DEF)
174)178)
175 179
176GENL_struct(DRBD_NLA_SET_ROLE_PARMS, 6, set_role_parms,180GENL_struct(DRBD_NLA_SET_ROLE_PARMS, 6, set_role_parms,
include/linux/drbd_limits.h+6−0
@@ -214,6 +214,7 @@ · 213 unmodified lines
214#define DRBD_ALLOW_TWO_PRIMARIES_DEF 0214#define DRBD_ALLOW_TWO_PRIMARIES_DEF 0
215#define DRBD_ALWAYS_ASBP_DEF 0215#define DRBD_ALWAYS_ASBP_DEF 0
216#define DRBD_USE_RLE_DEF 1216#define DRBD_USE_RLE_DEF 1
217#define DRBD_CSUMS_AFTER_CRASH_ONLY_DEF 0
217 218
218#define DRBD_AL_STRIPES_MIN 1219#define DRBD_AL_STRIPES_MIN 1
219#define DRBD_AL_STRIPES_MAX 1024220#define DRBD_AL_STRIPES_MAX 1024
@@ -224,4 +225,9 @@ · 4 unmodified lines
224#define DRBD_AL_STRIPE_SIZE_MAX 16777216225#define DRBD_AL_STRIPE_SIZE_MAX 16777216
225#define DRBD_AL_STRIPE_SIZE_DEF 32226#define DRBD_AL_STRIPE_SIZE_DEF 32
226#define DRBD_AL_STRIPE_SIZE_SCALE 'k' /* kilobytes */227#define DRBD_AL_STRIPE_SIZE_SCALE 'k' /* kilobytes */
228
229#define DRBD_SOCKET_CHECK_TIMEO_MIN 0
230#define DRBD_SOCKET_CHECK_TIMEO_MAX DRBD_PING_TIMEO_MAX
231#define DRBD_SOCKET_CHECK_TIMEO_DEF 0
232#define DRBD_SOCKET_CHECK_TIMEO_SCALE '1'
227#endif233#endif
include/scsi/sg.h+3−1
@@ -86,7 +86,9 @@ typedef struct sg_io_hdr · 85 unmodified lines
86#define SG_FLAG_MMAP_IO 4 /* request memory mapped IO */86#define SG_FLAG_MMAP_IO 4 /* request memory mapped IO */
87#define SG_FLAG_NO_DXFER 0x10000 /* no transfer of kernel buffers to/from */87#define SG_FLAG_NO_DXFER 0x10000 /* no transfer of kernel buffers to/from */
88 /* user space (debug indirect IO) */88 /* user space (debug indirect IO) */
89#define SG_FLAG_Q_AT_TAIL 0x10 /* default is Q_AT_HEAD */89/* defaults:: for sg driver: Q_AT_HEAD; for block layer: Q_AT_TAIL */
90#define SG_FLAG_Q_AT_TAIL 0x10
91#define SG_FLAG_Q_AT_HEAD 0x20
90 92
91/* following 'info' values are "or"-ed together */93/* following 'info' values are "or"-ed together */
92#define SG_INFO_OK_MASK 0x194#define SG_INFO_OK_MASK 0x1
include/trace/events/bcache.h+12−9
@@ -148,11 +148,13 @@ TRACE_EVENT(bcache_read, · 147 unmodified lines
148);148);
149 149
150TRACE_EVENT(bcache_write,150TRACE_EVENT(bcache_write,
151 TP_PROTO(struct bio *bio, bool writeback, bool bypass),151 TP_PROTO(struct cache_set *c, u64 inode, struct bio *bio,
152 TP_ARGS(bio, writeback, bypass),152 bool writeback, bool bypass),
153 TP_ARGS(c, inode, bio, writeback, bypass),
153 154
154 TP_STRUCT__entry(155 TP_STRUCT__entry(
155 __field(dev_t, dev )156 __array(char, uuid, 16 )
157 __field(u64, inode )
156 __field(sector_t, sector )158 __field(sector_t, sector )
157 __field(unsigned int, nr_sector )159 __field(unsigned int, nr_sector )
158 __array(char, rwbs, 6 )160 __array(char, rwbs, 6 )
@@ -161,7 +163,8 @@ TRACE_EVENT(bcache_write, · 2 unmodified lines
161 ),163 ),
162 164
163 TP_fast_assign(165 TP_fast_assign(
164 __entry->dev = bio->bi_bdev->bd_dev;166 memcpy(__entry->uuid, c->sb.set_uuid, 16);
167 __entry->inode = inode;
165 __entry->sector = bio->bi_iter.bi_sector;168 __entry->sector = bio->bi_iter.bi_sector;
166 __entry->nr_sector = bio->bi_iter.bi_size >> 9;169 __entry->nr_sector = bio->bi_iter.bi_size >> 9;
167 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_iter.bi_size);170 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_iter.bi_size);
@@ -169,8 +172,8 @@ TRACE_EVENT(bcache_write, · 1 unmodified line
169 __entry->bypass = bypass;172 __entry->bypass = bypass;
170 ),173 ),
171 174
172 TP_printk("%d,%d %s %llu + %u hit %u bypass %u",175 TP_printk("%pU inode %llu %s %llu + %u hit %u bypass %u",
173 MAJOR(__entry->dev), MINOR(__entry->dev),176 __entry->uuid, __entry->inode,
174 __entry->rwbs, (unsigned long long)__entry->sector,177 __entry->rwbs, (unsigned long long)__entry->sector,
175 __entry->nr_sector, __entry->writeback, __entry->bypass)178 __entry->nr_sector, __entry->writeback, __entry->bypass)
176);179);
@@ -258,9 +261,9 @@ DEFINE_EVENT(btree_node, bcache_btree_node_alloc, · 81 unmodified lines
258 TP_ARGS(b)261 TP_ARGS(b)
259);262);
260 263
261DEFINE_EVENT(btree_node, bcache_btree_node_alloc_fail,264DEFINE_EVENT(cache_set, bcache_btree_node_alloc_fail,
262 TP_PROTO(struct btree *b),265 TP_PROTO(struct cache_set *c),
263 TP_ARGS(b)266 TP_ARGS(c)
264);267);
265 268
266DEFINE_EVENT(btree_node, bcache_btree_node_free,269DEFINE_EVENT(btree_node, bcache_btree_node_free,
include/uapi/linux/bsg.h+6−5
@@ -10,12 +10,13 @@ · 9 unmodified lines
10#define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 210#define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2
11 11
12/*12/*
13 * For flags member below13 * For flag constants below:
14 * sg.h sg_io_hdr also has bits defined for it's flags member. However14 * sg.h sg_io_hdr also has bits defined for it's flags member. These
15 * none of these bits are implemented/used by bsg. The bits below are15 * two flag values (0x10 and 0x20) have the same meaning in sg.h . For
16 * allocated to not conflict with sg.h ones anyway.16 * bsg the BSG_FLAG_Q_AT_HEAD flag is ignored since it is the deafult.
17 */17 */
18#define BSG_FLAG_Q_AT_TAIL 0x10 /* default, == 0 at this bit, is Q_AT_HEAD */18#define BSG_FLAG_Q_AT_TAIL 0x10 /* default is Q_AT_HEAD */
19#define BSG_FLAG_Q_AT_HEAD 0x20
19 20
20struct sg_io_v4 {21struct sg_io_v4 {
21 __s32 guard; /* [i] 'Q' to differentiate from v3 */22 __s32 guard; /* [i] 'Q' to differentiate from v3 */
include/uapi/linux/virtio_blk.h+5−0
@@ -40,6 +40,7 @@ · 39 unmodified lines
40#define VIRTIO_BLK_F_WCE 9 /* Writeback mode enabled after reset */40#define VIRTIO_BLK_F_WCE 9 /* Writeback mode enabled after reset */
41#define VIRTIO_BLK_F_TOPOLOGY 10 /* Topology information is available */41#define VIRTIO_BLK_F_TOPOLOGY 10 /* Topology information is available */
42#define VIRTIO_BLK_F_CONFIG_WCE 11 /* Writeback mode available in config */42#define VIRTIO_BLK_F_CONFIG_WCE 11 /* Writeback mode available in config */
43#define VIRTIO_BLK_F_MQ 12 /* support more than one vq */
43 44
44#ifndef __KERNEL__45#ifndef __KERNEL__
45/* Old (deprecated) name for VIRTIO_BLK_F_WCE. */46/* Old (deprecated) name for VIRTIO_BLK_F_WCE. */
@@ -77,6 +78,10 @@ struct virtio_blk_config { · 31 unmodified lines
77 78
78 /* writeback mode (if VIRTIO_BLK_F_CONFIG_WCE) */79 /* writeback mode (if VIRTIO_BLK_F_CONFIG_WCE) */
79 __u8 wce;80 __u8 wce;
81 __u8 unused;
82
83 /* number of vqs, only available when VIRTIO_BLK_F_MQ is set */
84 __u16 num_queues;
80} __attribute__((packed));85} __attribute__((packed));
81 86
82/*87/*