Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1192883
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v7 4/6] block: loop: prepare for supporing direct IO |
| Date | 2015-07-27 11:50 +0200 |
| Message-ID | <pQNcJ-6eN-9@gated-at.bofh.it> (permalink) |
| References | <pMTqq-2pX-7@gated-at.bofh.it> <pMTqr-2pX-43@gated-at.bofh.it> <pQMgG-4SB-9@gated-at.bofh.it> <pQNcJ-6eN-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jul 27, 2015 at 05:41:57AM -0400, Ming Lei wrote: > > Why the hardcoded value? I suspect this should be more like: > > > > if (dio && inode->i_sb->s_bdev && > > (lo->lo_offset & (bdev_io_min(inode->i_sb->s_bdev) - 1)) != 0) > > dio = false; > > The above can't work if the backing device has a bigger sector size > (such as 4K), that is why loop's direct-io requires 512 min_io_size of > backing device. Why doesn't it work? If the backing device sector size is 4k and lo_offset is 0 or a multiple of 4k it should allow direct I/O, and my code sniplet will allow that. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH v7 4/6] block: loop: prepare for supporing direct IO Christoph Hellwig <hch@infradead.org> - 2015-07-27 11:50 +0200
Re: [PATCH v7 4/6] block: loop: prepare for supporing direct IO Ming Lei <ming.lei@canonical.com> - 2015-07-27 12:00 +0200
Re: [PATCH v7 4/6] block: loop: prepare for supporing direct IO Dave Chinner <david@fromorbit.com> - 2015-07-28 00:10 +0200
Re: [PATCH v7 4/6] block: loop: prepare for supporing direct IO Dave Chinner <david@fromorbit.com> - 2015-07-29 10:50 +0200
Re: [PATCH v7 4/6] block: loop: prepare for supporing direct IO Ming Lei <ming.lei@canonical.com> - 2015-07-30 10:10 +0200
csiph-web