lkml.org 
[lkml]   [2015]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: regression introduced by "block: Add support for DAX reads/writes to block devices"
    On Thu, Aug 06, 2015 at 10:52:47AM +0300, Boaz Harrosh wrote:
    > On 08/06/2015 06:24 AM, Dave Chinner wrote:
    > > On Wed, Aug 05, 2015 at 09:42:54PM -0400, Linda Knippers wrote:
    > >> On 08/05/2015 06:01 PM, Dave Chinner wrote:
    > >>> On Wed, Aug 05, 2015 at 04:19:08PM -0400, Jeff Moyer wrote:
    > <>
    > >>>>
    > >>>> I sat down with Linda to look into it, and the problem is that mkfs.xfs
    > >>>> sets the blocksize of the device to 512 (via BLKBSZSET), and then reads
    > >>>> from the last sector of the device. This results in dax_io trying to do
    > >>>> a page-sized I/O at 512 bytes from the end of the device.
    > >>>
    >
    > This part I do not understand. how is mkfs.xfs reading the sector?
    > Is it through open(/dev/pmem0,...) ? O_DIRECT?

    mkfs.xfs uses O_DIRECT. Only if open(O_DIRECT) fails or mkfs.xfs is
    told that it is working on an image file does it fall back to
    buffered IO. All of the XFS userspace tools work this way to prevent
    page cache pollution issues with read-once or write-once data during
    operation.

    Cheers,

    Dave.
    --
    Dave Chinner
    david@fromorbit.com


    \
     
     \ /
      Last update: 2015-08-06 22:41    [W:3.313 / U:0.552 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site