qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* How to check when "raw" format driver uses a "regular" file?
@ 2021-01-25 15:05 Philippe Mathieu-Daudé
  2021-01-25 15:43 ` Kevin Wolf
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-25 15:05 UTC (permalink / raw)
  To: Qemu-block, Kevin Wolf, Max Reitz; +Cc: Paolo Bonzini, qemu-devel

Hi,

Is it possible to restrict a block driver to a particular set of
options? In my case I'd like to restrict the raw driver to regular files.

I noticed the NFS driver does it locally in nfs_client_open(),
and FUSE has is_regular_file() -- which is POSIX specific however.

When a backend is a SCSI drive, the block layer provide the blk_is_sg()
method to test it.
1/ Should I provide a similar blk_is_regular_file()?

2/ There is no oslib function to check for regular file,
should I add one too?

Thanks,

Phil.



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

end of thread, other threads:[~2021-01-25 16:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-25 15:05 How to check when "raw" format driver uses a "regular" file? Philippe Mathieu-Daudé
2021-01-25 15:43 ` Kevin Wolf
2021-01-25 16:01   ` Philippe Mathieu-Daudé
2021-01-25 16:06     ` Peter Maydell
2021-01-25 16:19     ` Kevin Wolf

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).