From: Dave Chinner <david@fromorbit.com>
To: Boaz Harrosh <openosd@gmail.com>
Cc: xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org, jack@suse.cz,
willy@linux.intel.com
Subject: Re: [PATCH 3/6] xfs: add DAX file operations support
Date: Thu, 5 Mar 2015 00:01:00 +1100 [thread overview]
Message-ID: <20150304130100.GU18360@dastard> (raw)
In-Reply-To: <54F6D9E4.9050803@gmail.com>
On Wed, Mar 04, 2015 at 12:09:40PM +0200, Boaz Harrosh wrote:
> On 03/04/2015 01:30 AM, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > Add the initial support for DAX file operations to XFS. This
> > includes the necessary block allocation and mmap page fault hooks
> > for DAX to function.
> >
> > Note that the current block allocation code abuses the mapping
> > buffer head to provide a completion callback for unwritten extent
> > allocation when DAX is clearing blocks. The DAX interface needs to
> > be changed to provide a callback similar to get_blocks for this
> > callback.
>
> It looks like this comment is stale for this set
>
> A question below
.....
> > .fsync = xfs_dir_fsync,
> > };
> >
> > -static const struct vm_operations_struct xfs_file_vm_ops = {
> > - .fault = xfs_filemap_fault,
> > - .map_pages = filemap_map_pages,
> > - .page_mkwrite = xfs_filemap_page_mkwrite,
> > +#ifdef CONFIG_FS_DAX
> > +const struct file_operations xfs_file_dax_operations = {
> > + .llseek = xfs_file_llseek,
> > + .read = new_sync_read,
> > + .write = new_sync_write,
> > + .read_iter = xfs_file_read_iter,
> > + .write_iter = xfs_file_write_iter,
> > + .unlocked_ioctl = xfs_file_ioctl,
> > +#ifdef CONFIG_COMPAT
> > + .compat_ioctl = xfs_file_compat_ioctl,
> > +#endif
> > + .mmap = xfs_file_mmap,
> > + .open = xfs_file_open,
> > + .release = xfs_file_release,
> > + .fsync = xfs_file_fsync,
> > + .fallocate = xfs_file_fallocate,
> > };
>
> sigh, The same problem was in ext4, the reason you need
> a second xfs_file_operations vector is because of the minus
> .splice_read = xfs_file_splice_read,
> .splice_write = iter_file_splice_write,
> Which do not exist for DAX
Right, because they use buffered IO, and DAX doesn't do buffered
IO.
> Would it be cleaner to call default_file_splice_write/read
> directly from xfs_file_splice_read/write in the DAX case
> and only keep one vector?
Umm, looking at the code, that is different ot what I remember. it
used to be if the filesystem did not support splice, then it did not
set a vector. That has changed - it now calls a generic splice path
instead.
So, we definitely need splice to/from DAX enabled inodes to be
rejected. I'll have a look at that...
> I have looked through the code, nothing stands out that I
> can see. Do you have a public tree I can pull for easy
> testing?
No, not for a small RFC patchset. git am is your friend ;)
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2015-03-04 13:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 23:30 [RFC PATCH 0/6] xfs: DAX support Dave Chinner
2015-03-03 23:30 ` [PATCH 1/6] dax: don't abuse get_block mapping for endio callbacks Dave Chinner
2015-03-04 15:54 ` Jan Kara
2015-03-04 22:29 ` Dave Chinner
2015-03-03 23:30 ` [PATCH 2/6] xfs: add DAX block zeroing support Dave Chinner
2015-03-03 23:30 ` [PATCH 3/6] xfs: add DAX file operations support Dave Chinner
2015-03-04 10:09 ` Boaz Harrosh
2015-03-04 13:01 ` Dave Chinner [this message]
2015-03-04 14:54 ` Boaz Harrosh
2015-03-04 22:03 ` Dave Chinner
2015-03-24 4:27 ` Dave Chinner
2015-03-24 7:01 ` Christoph Hellwig
2015-03-24 8:13 ` Boaz Harrosh
2015-03-04 16:18 ` Jan Kara
2015-03-04 22:00 ` Dave Chinner
2015-03-05 11:05 ` Jan Kara
2015-03-22 23:02 ` Dave Chinner
2015-03-03 23:30 ` [PATCH 4/6] xfs: add DAX truncate support Dave Chinner
2015-03-03 23:30 ` [PATCH 5/6] xfs: add DAX IO path support Dave Chinner
2015-03-03 23:30 ` [PATCH 6/6] xfs: add initial DAX support Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150304130100.GU18360@dastard \
--to=david@fromorbit.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=openosd@gmail.com \
--cc=willy@linux.intel.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).