for-6.4/block-2023-05-06
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmRWLQYQHGF4Ym9lQGtl
cm5lbC5kawAKCRD301j7KXHgpnwhD/4xRYfAY4O0oGZCITiKEEFxiSfDHCPMEBji
zTEtideDRjcrpFmjmZ411C9prW32MxYQ3wQTf4O7w4t906xTYVr9FQy8g3Et4izI
zglPcsa2jPzYCadQ0Ye4n9dRuYOH9FDJzDDLC+smu8zQKKmAqEAN/1ftpnADdVrY
qX1sHyfz4RQRAgTHg2WqgKOi2O9VwGSMwOfBocmzAnruv9oLUlypcGnFPRCSZH/a
OKpUZlvQhCBZTKScvVxQeJMg2Tl5yokQ0TH+gkQsdav9XcPJktqXiuD+c4h6q5ux
oTlysEqcrwcaAafOcV0w9u80SFNlFACUYsNmEnFJaPXFTqAdNHvo1DJNsmxiHJDU
bGo5ktlo5b/VZ51niOoWvGxursavq16G4yIYlGGHc7f4wGs12oc5ZP/yM3GRUY+C
PdezwEvvQufxP7sFokfpgAS4SuH+tBlrhFXMsYaI4NukZQW4TK1zzbMrzOkdxFhW
BOx17VFUKWtUnRmxinFGIA8Vj+FXN+E+ND+FoDsbrMyJD4maKDdJapPchG0J0Vbs
pDcsB4c0pBC6H2xrobKiA1CuSq2t2qvyvwe1Zl2Xd+RVW9vBB5SI6HXYrC+UtxwY
7LfX8F13cFD1E6iJ9Nta6x8fOunGnOVBdW5O0k4hDWEuZduvHItEDn2c3Ehqp4Jw
P8dFBbk8SQ==
=gAYf
-----END PGP SIGNATURE-----
Merge tag 'for-6.4/block-2023-05-06' of git://git.kernel.dk/linux
Pull more block updates from Jens Axboe:
- MD pull request via Song:
- Improve raid5 sequential IO performance on spinning disks, which
fixes a regression since v6.0 (Jan Kara)
- Fix bitmap offset types, which fixes an issue introduced in this
merge window (Jonathan Derrick)
- Cleanup of hweight type used for cgroup writeback (Maxim)
- Fix a regression with the "has_submit_bio" changes across partitions
(Ming)
- Cleanup of QUEUE_FLAG_ADD_RANDOM clearing.
We used to set this flag on queues non blk-mq queues, and hence some
drivers clear it unconditionally. Since all of these have since been
converted to true blk-mq drivers, drop the useless clear as the bit
is not set (Chaitanya)
- Fix the flags being set in a bio for a flush for drbd (Christoph)
- Cleanup and deduplication of the code handling setting block device
capacity (Damien)
- Fix for ublk handling IO timeouts (Ming)
- Fix for a regression in blk-cgroup teardown (Tao)
- NBD documentation and code fixes (Eric)
- Convert blk-integrity to using device_attributes rather than a second
kobject to manage lifetimes (Thomas)
* tag 'for-6.4/block-2023-05-06' of git://git.kernel.dk/linux:
ublk: add timeout handler
drbd: correctly submit flush bio on barrier
mailmap: add mailmap entries for Jens Axboe
block: Skip destroyed blkg when restart in blkg_destroy_all()
writeback: fix call of incorrect macro
md: Fix bitmap offset type in sb writer
md/raid5: Improve performance for sequential IO
docs nbd: userspace NBD now favors github over sourceforge
block nbd: use req.cookie instead of req.handle
uapi nbd: add cookie alias to handle
uapi nbd: improve doc links to userspace spec
blk-integrity: register sysfs attributes on struct device
blk-integrity: convert to struct device_attribute
blk-integrity: use sysfs_emit
block/drivers: remove dead clear of random flag
block: sync part's ->bd_has_submit_bio with disk's
block: Cleanup set_capacity()/bdev_set_nr_sectors()
This commit is contained in:
commit
a3b111b046
20 changed files with 192 additions and 170 deletions
|
|
@ -11,6 +11,8 @@
|
|||
* Cleanup PARANOIA usage & code.
|
||||
* 2004/02/19 Paul Clements
|
||||
* Removed PARANOIA, plus various cleanup and comments
|
||||
* 2023 Copyright Red Hat
|
||||
* Link to userspace extensions, favor cookie over handle.
|
||||
*/
|
||||
|
||||
#ifndef _UAPILINUX_NBD_H
|
||||
|
|
@ -30,12 +32,18 @@
|
|||
#define NBD_SET_TIMEOUT _IO( 0xab, 9 )
|
||||
#define NBD_SET_FLAGS _IO( 0xab, 10)
|
||||
|
||||
/*
|
||||
* See also https://github.com/NetworkBlockDevice/nbd/blob/master/doc/proto.md
|
||||
* for additional userspace extensions not yet utilized in the kernel module.
|
||||
*/
|
||||
|
||||
enum {
|
||||
NBD_CMD_READ = 0,
|
||||
NBD_CMD_WRITE = 1,
|
||||
NBD_CMD_DISC = 2,
|
||||
NBD_CMD_FLUSH = 3,
|
||||
NBD_CMD_TRIM = 4
|
||||
/* userspace defines additional extension commands */
|
||||
};
|
||||
|
||||
/* values for flags field, these are server interaction specific. */
|
||||
|
|
@ -64,15 +72,19 @@ enum {
|
|||
#define NBD_REQUEST_MAGIC 0x25609513
|
||||
#define NBD_REPLY_MAGIC 0x67446698
|
||||
/* Do *not* use magics: 0x12560953 0x96744668. */
|
||||
/* magic 0x668e33ef for structured reply not supported by kernel yet */
|
||||
|
||||
/*
|
||||
* This is the packet used for communication between client and
|
||||
* server. All data are in network byte order.
|
||||
*/
|
||||
struct nbd_request {
|
||||
__be32 magic;
|
||||
__be32 type; /* == READ || == WRITE */
|
||||
char handle[8];
|
||||
__be32 magic; /* NBD_REQUEST_MAGIC */
|
||||
__be32 type; /* See NBD_CMD_* */
|
||||
union {
|
||||
__be64 cookie; /* Opaque identifier for request */
|
||||
char handle[8]; /* older spelling of cookie */
|
||||
};
|
||||
__be64 from;
|
||||
__be32 len;
|
||||
} __attribute__((packed));
|
||||
|
|
@ -82,8 +94,11 @@ struct nbd_request {
|
|||
* it has completed an I/O request (or an error occurs).
|
||||
*/
|
||||
struct nbd_reply {
|
||||
__be32 magic;
|
||||
__be32 magic; /* NBD_REPLY_MAGIC */
|
||||
__be32 error; /* 0 = ok, else error */
|
||||
char handle[8]; /* handle you got from request */
|
||||
union {
|
||||
__be64 cookie; /* Opaque identifier from request */
|
||||
char handle[8]; /* older spelling of cookie */
|
||||
};
|
||||
};
|
||||
#endif /* _UAPILINUX_NBD_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue