On Sat, Dec 20, 2014 at 06:51:33AM +, Al Viro wrote:
> > The problem is that the use of ->direct_IO by the swap code is a gross
> > layering violation. ->direct_IO is a callback for the filesystem, and
> > the swap code need to call ->read_iter instead of ->readpage and
> > ->write_tier
On Sat, Dec 20, 2014 at 06:51:33AM +, Al Viro wrote:
The problem is that the use of -direct_IO by the swap code is a gross
layering violation. -direct_IO is a callback for the filesystem, and
the swap code need to call -read_iter instead of -readpage and
-write_tier instead of
On Sat, Dec 20, 2014 at 06:51:33AM +, Al Viro wrote:
> On Mon, Dec 15, 2014 at 08:56:15AM -0800, Christoph Hellwig wrote:
> > On Mon, Dec 15, 2014 at 05:27:05PM +0100, Jan Kara wrote:
> > > On Sun 14-12-14 21:26:56, Omar Sandoval wrote:
> > > > The generic write code locks i_mutex for a
On Sat, Dec 20, 2014 at 06:51:33AM +, Al Viro wrote:
On Mon, Dec 15, 2014 at 08:56:15AM -0800, Christoph Hellwig wrote:
On Mon, Dec 15, 2014 at 05:27:05PM +0100, Jan Kara wrote:
On Sun 14-12-14 21:26:56, Omar Sandoval wrote:
The generic write code locks i_mutex for a direct_IO.
On Mon, Dec 15, 2014 at 08:56:15AM -0800, Christoph Hellwig wrote:
> On Mon, Dec 15, 2014 at 05:27:05PM +0100, Jan Kara wrote:
> > On Sun 14-12-14 21:26:56, Omar Sandoval wrote:
> > > The generic write code locks i_mutex for a direct_IO. Swap-over-NFS
> > > doesn't grab the mutex because
On Mon, Dec 15, 2014 at 08:56:15AM -0800, Christoph Hellwig wrote:
On Mon, Dec 15, 2014 at 05:27:05PM +0100, Jan Kara wrote:
On Sun 14-12-14 21:26:56, Omar Sandoval wrote:
The generic write code locks i_mutex for a direct_IO. Swap-over-NFS
doesn't grab the mutex because nfs_direct_IO
On Thu, Dec 18, 2014 at 10:24:05PM -0800, Omar Sandoval wrote:
> + swap_file = file_open_name(name, O_RDWR | O_LARGEFILE | O_DIRECT, 0);
> + if (IS_ERR(swap_file) && PTR_ERR(swap_file) == -EINVAL)
ITYM if (swap_file == ERR_PTR(-EINVAL)) here...
--
To unsubscribe from this list: send
On Wed, Dec 17, 2014 at 10:03:13PM +, Al Viro wrote:
> On Wed, Dec 17, 2014 at 10:52:56AM -0800, Christoph Hellwig wrote:
> > On Wed, Dec 17, 2014 at 06:58:32AM -0800, Omar Sandoval wrote:
> > > See my previous message. If we use O_DIRECT on the original open, then
> > > filesystems that
On Wed, Dec 17, 2014 at 10:03:13PM +, Al Viro wrote:
On Wed, Dec 17, 2014 at 10:52:56AM -0800, Christoph Hellwig wrote:
On Wed, Dec 17, 2014 at 06:58:32AM -0800, Omar Sandoval wrote:
See my previous message. If we use O_DIRECT on the original open, then
filesystems that implement bmap
On Thu, Dec 18, 2014 at 10:24:05PM -0800, Omar Sandoval wrote:
+ swap_file = file_open_name(name, O_RDWR | O_LARGEFILE | O_DIRECT, 0);
+ if (IS_ERR(swap_file) PTR_ERR(swap_file) == -EINVAL)
ITYM if (swap_file == ERR_PTR(-EINVAL)) here...
--
To unsubscribe from this list: send the
On Wed, Dec 17, 2014 at 10:52:56AM -0800, Christoph Hellwig wrote:
> On Wed, Dec 17, 2014 at 06:58:32AM -0800, Omar Sandoval wrote:
> > See my previous message. If we use O_DIRECT on the original open, then
> > filesystems that implement bmap but not direct_IO will no longer work.
> > These are
On Wed, Dec 17, 2014 at 06:58:32AM -0800, Omar Sandoval wrote:
> See my previous message. If we use O_DIRECT on the original open, then
> filesystems that implement bmap but not direct_IO will no longer work.
> These are the ones that I found in my tree:
In the long run I don't think they are
On Wed, Dec 17, 2014 at 12:24:37AM -0800, Christoph Hellwig wrote:
> On Wed, Dec 17, 2014 at 08:20:21AM +, Al Viro wrote:
> > Where the hell would those other references come from? We open the damn
> > thing in sys_swapon(), never put it into descriptor tables, etc. and
> > the only reason
On Wed, Dec 17, 2014 at 08:20:21AM +, Al Viro wrote:
> Where the hell would those other references come from? We open the damn
> thing in sys_swapon(), never put it into descriptor tables, etc. and
> the only reason why we use filp_close() instead of fput() is that we
> would miss ->flush()
On Wed, Dec 17, 2014 at 12:06:10AM -0800, Christoph Hellwig wrote:
> > This seems to be more or less equivalent to doing a fcntl(F_SETFL) to
> > add the O_DIRECT flag to swap_file (which is a struct file *). Swapoff
> > calls filp_close on swap_file, so I don't see why it's necessary to
> > clear
On Tue, Dec 16, 2014 at 12:56:24AM -0800, Omar Sandoval wrote:
> --- a/mm/swapfile.c
> +++ b/mm/swapfile.c
> @@ -1728,6 +1728,9 @@ static int setup_swap_extents(struct swap_info_struct
> *sis, sector_t *span)
> }
>
> if (mapping->a_ops->swap_activate) {
> + if
On Tue, Dec 16, 2014 at 12:56:24AM -0800, Omar Sandoval wrote:
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -1728,6 +1728,9 @@ static int setup_swap_extents(struct swap_info_struct
*sis, sector_t *span)
}
if (mapping-a_ops-swap_activate) {
+ if
On Wed, Dec 17, 2014 at 12:06:10AM -0800, Christoph Hellwig wrote:
This seems to be more or less equivalent to doing a fcntl(F_SETFL) to
add the O_DIRECT flag to swap_file (which is a struct file *). Swapoff
calls filp_close on swap_file, so I don't see why it's necessary to
clear the
On Wed, Dec 17, 2014 at 08:20:21AM +, Al Viro wrote:
Where the hell would those other references come from? We open the damn
thing in sys_swapon(), never put it into descriptor tables, etc. and
the only reason why we use filp_close() instead of fput() is that we
would miss -flush()
On Wed, Dec 17, 2014 at 12:24:37AM -0800, Christoph Hellwig wrote:
On Wed, Dec 17, 2014 at 08:20:21AM +, Al Viro wrote:
Where the hell would those other references come from? We open the damn
thing in sys_swapon(), never put it into descriptor tables, etc. and
the only reason why we
On Wed, Dec 17, 2014 at 06:58:32AM -0800, Omar Sandoval wrote:
See my previous message. If we use O_DIRECT on the original open, then
filesystems that implement bmap but not direct_IO will no longer work.
These are the ones that I found in my tree:
In the long run I don't think they are worth
On Wed, Dec 17, 2014 at 10:52:56AM -0800, Christoph Hellwig wrote:
On Wed, Dec 17, 2014 at 06:58:32AM -0800, Omar Sandoval wrote:
See my previous message. If we use O_DIRECT on the original open, then
filesystems that implement bmap but not direct_IO will no longer work.
These are the ones
On Tue, Dec 16, 2014 at 12:35:43AM -0800, Christoph Hellwig wrote:
> On Mon, Dec 15, 2014 at 02:11:00PM -0800, Omar Sandoval wrote:
> > Ok, I got the swap code working with ->read_iter/->write_iter without
> > too much trouble. I wanted to double check before I submit if there's
> > any gotchas
On Mon, Dec 15, 2014 at 02:11:00PM -0800, Omar Sandoval wrote:
> Ok, I got the swap code working with ->read_iter/->write_iter without
> too much trouble. I wanted to double check before I submit if there's
> any gotchas involved with adding the O_DIRECT flag to a file pointer
> after it has been
On Mon, Dec 15, 2014 at 02:11:00PM -0800, Omar Sandoval wrote:
Ok, I got the swap code working with -read_iter/-write_iter without
too much trouble. I wanted to double check before I submit if there's
any gotchas involved with adding the O_DIRECT flag to a file pointer
after it has been opened
On Tue, Dec 16, 2014 at 12:35:43AM -0800, Christoph Hellwig wrote:
On Mon, Dec 15, 2014 at 02:11:00PM -0800, Omar Sandoval wrote:
Ok, I got the swap code working with -read_iter/-write_iter without
too much trouble. I wanted to double check before I submit if there's
any gotchas involved
On Mon, Dec 15, 2014 at 08:56:15AM -0800, Christoph Hellwig wrote:
> On Mon, Dec 15, 2014 at 05:27:05PM +0100, Jan Kara wrote:
> > On Sun 14-12-14 21:26:56, Omar Sandoval wrote:
> > > The generic write code locks i_mutex for a direct_IO. Swap-over-NFS
> > > doesn't grab the mutex because
On Mon, Dec 15, 2014 at 05:27:05PM +0100, Jan Kara wrote:
> On Sun 14-12-14 21:26:56, Omar Sandoval wrote:
> > The generic write code locks i_mutex for a direct_IO. Swap-over-NFS
> > doesn't grab the mutex because nfs_direct_IO doesn't expect i_mutex to
> > be held, but most direct_IO
On Sun 14-12-14 21:26:56, Omar Sandoval wrote:
> The generic write code locks i_mutex for a direct_IO. Swap-over-NFS
> doesn't grab the mutex because nfs_direct_IO doesn't expect i_mutex to
> be held, but most direct_IO implementations do.
I think you are speaking about direct IO writes only,
On Sun 14-12-14 21:26:56, Omar Sandoval wrote:
The generic write code locks i_mutex for a direct_IO. Swap-over-NFS
doesn't grab the mutex because nfs_direct_IO doesn't expect i_mutex to
be held, but most direct_IO implementations do.
I think you are speaking about direct IO writes only,
On Mon, Dec 15, 2014 at 05:27:05PM +0100, Jan Kara wrote:
On Sun 14-12-14 21:26:56, Omar Sandoval wrote:
The generic write code locks i_mutex for a direct_IO. Swap-over-NFS
doesn't grab the mutex because nfs_direct_IO doesn't expect i_mutex to
be held, but most direct_IO implementations do.
On Mon, Dec 15, 2014 at 08:56:15AM -0800, Christoph Hellwig wrote:
On Mon, Dec 15, 2014 at 05:27:05PM +0100, Jan Kara wrote:
On Sun 14-12-14 21:26:56, Omar Sandoval wrote:
The generic write code locks i_mutex for a direct_IO. Swap-over-NFS
doesn't grab the mutex because nfs_direct_IO
The generic write code locks i_mutex for a direct_IO. Swap-over-NFS
doesn't grab the mutex because nfs_direct_IO doesn't expect i_mutex to
be held, but most direct_IO implementations do.
Signed-off-by: Omar Sandoval
---
mm/page_io.c | 3 +++
1 file changed, 3 insertions(+)
diff --git
The generic write code locks i_mutex for a direct_IO. Swap-over-NFS
doesn't grab the mutex because nfs_direct_IO doesn't expect i_mutex to
be held, but most direct_IO implementations do.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
mm/page_io.c | 3 +++
1 file changed, 3 insertions(+)
34 matches
Mail list logo