Re: [Qemu-devel] [PATCH v5 2/5] raw-posix: Refactor logical block size detection.

2015-01-13 Thread Stefan Hajnoczi
On Tue, Jan 13, 2015 at 01:03:03PM +0300, Ekaterina Tumanova wrote: > On 01/02/2015 02:52 PM, Stefan Hajnoczi wrote: > >On Thu, Dec 18, 2014 at 12:18:01PM +0100, Ekaterina Tumanova wrote: > >>+#if defined(BLKSSZGET) > >>+# define SECTOR_SIZE BLKSSZGET > >>+#elif defined(DKIOCGETBLOCKSIZE) > >>+#

Re: [Qemu-devel] [PATCH v5 2/5] raw-posix: Refactor logical block size detection.

2015-01-13 Thread Ekaterina Tumanova
On 01/02/2015 02:52 PM, Stefan Hajnoczi wrote: On Thu, Dec 18, 2014 at 12:18:01PM +0100, Ekaterina Tumanova wrote: +#if defined(BLKSSZGET) +# define SECTOR_SIZE BLKSSZGET +#elif defined(DKIOCGETBLOCKSIZE) +# define SECTOR_SIZE DKIOCGETBLOCKSIZE +#elif defined(DIOCGSECTORSIZE) +# define SECTOR

Re: [Qemu-devel] [PATCH v5 2/5] raw-posix: Refactor logical block size detection.

2015-01-02 Thread Stefan Hajnoczi
On Thu, Dec 18, 2014 at 12:18:01PM +0100, Ekaterina Tumanova wrote: > +#if defined(BLKSSZGET) > +# define SECTOR_SIZE BLKSSZGET > +#elif defined(DKIOCGETBLOCKSIZE) > +# define SECTOR_SIZE DKIOCGETBLOCKSIZE > +#elif defined(DIOCGSECTORSIZE) > +# define SECTOR_SIZE DIOCGSECTORSIZE > +#else > +

[Qemu-devel] [PATCH v5 2/5] raw-posix: Refactor logical block size detection.

2014-12-18 Thread Ekaterina Tumanova
1. Move block size detection into dedicated function. 2. Select exactly one IOCTL that detects blocksize, specific to the host OS. Signed-off-by: Ekaterina Tumanova Reviewed-by: Markus Armbruster --- block/raw-posix.c | 41 - 1 file changed, 24 insertions