The NBD protocol defines the flag NBD_FLAG_ROTATIONAL to flag that the export in use should be treated as a rotational device. Add support for that flag to the kernel driver.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -51,8 +51,9 @@ enum { · 50 unmodified lines | ||
| 51 | 51 | #define NBD_FLAG_READ_ONLY (1 << 1) /* device is read-only */ |
| 52 | 52 | #define NBD_FLAG_SEND_FLUSH (1 << 2) /* can flush writeback cache */ |
| 53 | 53 | #define NBD_FLAG_SEND_FUA (1 << 3) /* send FUA (forced unit access) */ |
| 54 | −/* there is a gap here to match userspace */ | |
| 54 | +#define NBD_FLAG_ROTATIONAL (1 << 4) /* device is rotational */ | |
| 55 | 55 | #define NBD_FLAG_SEND_TRIM (1 << 5) /* send trim/discard */ |
| 56 | +/* there is a gap here to match userspace */ | |
| 56 | 57 | #define NBD_FLAG_CAN_MULTI_CONN (1 << 8) /* Server supports multiple connections per export. */ |
| 57 | 58 | |
| 58 | 59 | /* values for cmd flags in the upper 16 bits of request type */ |