qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 0/3] block: Inquire images’ rotational info
@ 2019-05-24 17:28 Max Reitz
  2019-05-24 17:28 ` [Qemu-devel] [RFC 1/3] block: Add ImageRotationalInfo Max Reitz
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Max Reitz @ 2019-05-24 17:28 UTC (permalink / raw)
  To: qemu-block
  Cc: Kevin Wolf, Anton Nefedov, Alberto Garcia, qemu-devel, Max Reitz,
	Vladimir Sementsov-Ogievskiy

Hi,

http://lists.nongnu.org/archive/html/qemu-block/2019-05/msg00569.html
shows that optimizations affect HDDs and SSDs differently.  It would be
nice if we could differentiate between the two and then choose to adjust
our behavior depending on whether a given image is stored on an HDD or
not.

Or maybe it isn’t so nice.  That’s one reason this is an RFC.

The other is that I implemented recognition of the rotational status by
querying sysfs.  That looks stupid, but I didn’t find a better way
(there is a BLKROTATIONAL ioctl, but that only works on device files).

But, hey, if you look through block/file-posix.c, you’ll find that I’m
not the first to query sysfs.  hdev_get_max_segments() does so, too.  So
maybe it isn’t that bad of an idea.


What do you think?  Is the whole idea stupid?  Just the implementation?
Or does it make sense?


Max Reitz (3):
  block: Add ImageRotationalInfo
  file-posix: Inquire rotational status
  qcow2: Evaluate rotational info

 qapi/block-core.json  | 19 ++++++++++-
 block/qcow2.h         |  3 ++
 include/block/block.h |  7 +++++
 block.c               | 20 +++++++++++-
 block/file-posix.c    | 73 +++++++++++++++++++++++++++++++++++++++++++
 block/qapi.c          |  3 ++
 block/qcow2.c         | 34 +++++++++++++++++---
 7 files changed, 153 insertions(+), 6 deletions(-)

-- 
2.21.0



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2019-06-13 18:18 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-24 17:28 [Qemu-devel] [RFC 0/3] block: Inquire images’ rotational info Max Reitz
2019-05-24 17:28 ` [Qemu-devel] [RFC 1/3] block: Add ImageRotationalInfo Max Reitz
2019-05-26 15:08   ` Alberto Garcia
2019-05-27 12:16     ` Max Reitz
2019-05-27 12:37       ` Alberto Garcia
2019-05-27 12:57         ` Max Reitz
2019-05-27 13:44           ` Anton Nefedov
2019-05-27 13:51             ` Max Reitz
2019-05-27 13:53             ` Alberto Garcia
2019-05-29 22:10   ` Kevin Wolf
2019-05-31 11:51     ` Max Reitz
2019-05-31 14:02       ` Kevin Wolf
2019-05-24 17:28 ` [Qemu-devel] [RFC 2/3] file-posix: Inquire rotational status Max Reitz
2019-05-24 17:28 ` [Qemu-devel] [RFC 3/3] qcow2: Evaluate rotational info Max Reitz
2019-05-24 17:52 ` [Qemu-devel] [RFC 0/3] block: Inquire images’ " Eric Blake
2019-06-13 16:12 ` Stefan Hajnoczi
2019-06-13 16:20   ` Max Reitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).