Re: [PATCH v2] Do a proper locking for mmap and block size change

Linus Torvalds
2012-11-29T20:52:46Z

On Thu, Nov 29, 2012 at 11:48 AM, Chris Mason <chris.mason@fusionio.com> wrote:
>
> It was all a trick to get you to say the AIO code was sane.

It's only sane compared to the DIO code.

That said, I hate AIO much less these days that we've largely merged
the code with the regular IO. It's still a horrible interface, but at
least it is no longer a really disgusting separate implementation in
the kernel of that horrible interface.

So yeah, I guess AIO really is pretty sane these days.

> It looks like we could use the private copy of i_blkbits that DIO is
> already recording.

Yes. But that didn't fix the blkdev_get_blocks() mess you pointed out.

I've pushed out two more commits to the 'block-dev' branch at

git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux block-dev

in case anybody wants to take a look.

It is - as usual - entirely untested. It compiles, and I *think* that
blkdev_get_blocks() makes a whole lot more sense this way - as you
said, it should be byte-based (although it actually does the block
number conversion because I worried about overflow - probably
unnecessarily).

Comments?

Linus