From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH] fuse: Add support for fuse stacked I/O Date: Fri, 15 Jan 2016 13:53:34 -0800 Message-ID: References: <565394BE.4040506@codeaurora.org> <5696E366.2080605@codeaurora.org> <20160114045716.GB8006@kroah.com> <5697EF97.9020800@codeaurora.org> <871t9i91e1.fsf@thinkpad.rath.org> <56994884.9060002@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Andy Lutomirski Cc: Nikhilesh Reddy , Nikolaus Rath , fuse-devel , Al Viro , Greg KH , linux-fsdevel , Linux API , Jan Kara , Theodore Ts'o , sven.utcke-Mmb7MZpHnFY@public.gmane.org, Miklos Szeredi , Richard Weinberger , Linux Kernel Mailing List , Antonio SJ Musumeci List-Id: linux-api@vger.kernel.org On Fri, Jan 15, 2016 at 1:46 PM, Andy Lutomirski wrote: > If mmap sets vm_file to the underlying thing, wouldn't CRIU and > anything else that uses map_files get confused? Or did you have > something else in mind? Why would they care? Also, I don't think you actually need to change vm_file - we have this whole notion of "inode->i_data" vs "inode->i_mapping". So I think you could set the "i_mapping" of the fuse inode to be the i_mapping of the passed-through-to inode, and it should just work. And no, I didn't look into this very deeply, and maybe there is some annoying detail that would make that not work well. But that's part of the whole point of the i_mapping indirection: so that you can share the page cache when you have two separate anchor points. I think coda uses it for the local caching, and block devices use it to not have mapping aliases between different inodex that all are the same block device. Linus