Don't break into kgdb when userspace executes the kernel break instructions
(KGDB_BREAKINST and KGDB_COMPILED_BREAK). The kernel will oops in
kgdb_handle_exception.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
The following program will immediately cause a kernel oops:
.globl _start
On Fri, Jul 18, 2014 at 03:51:31PM -0700, Omar Sandoval wrote:
Don't break into kgdb when userspace executes the kernel break instructions
(KGDB_BREAKINST and KGDB_COMPILED_BREAK). The kernel will oops in
kgdb_handle_exception.
Signed-off-by: Omar Sandoval osan...@osandov.com
or KGDB_COMPILED_BREAK on ARM, or
brk #KGDB_{DYN,COMPILED}_DGB_BRK_IMM on ARM64.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
The following program reproduces the fixed problem on ARM:
.globl _start
_start:
udf #65006 @ KGDB_BREAKINST
And on ARM64:
.globl _start
_start:
brk #0x400
Hi,
On Wed, Jul 30, 2014 at 12:24:14PM +0100, Will Deacon wrote:
Whilst this sounds like a worrying problem, I've failed to reproduce it
on arm64. Executing a brk instruction with either KGDB_DYN_DGB_BRK_IMM or
KDBG_COMPILED_DBG_BRK_IMM immediates from userspace results in a SIGTRAP being
or KGDB_COMPILED_BREAK.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
On a kernel running with kgdb enabled, this program reproduces the problem:
.globl _start
_start:
udf #65006 @ KGDB_BREAKINST
The same problem has been fixed in ARM64.
arch/arm/kernel/kgdb.c | 4
1 file changed, 4
Hi, Will,
On Thu, Jul 31, 2014 at 11:46:53AM +0100, Will Deacon wrote:
I'll merge the arm64 diff I proposed. Could you repost the ARM part please?
I've just reposted it, hopefully we can get that merged in soon as well.
I think enabling and activating kgdb by default is a pretty crazy thing to
On Fri, Oct 03, 2014 at 10:12:38AM -0700, Omar Sandoval wrote:
The RCU-friendly string API used internally by BTRFS is generic enough for
common use. This doesn't add any new functionality, but instead just moves the
code and documents the existing API.
Signed-off-by: Omar Sandoval osan
Fix checkpatch.pl Alignment should match open parenthesis.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
drivers/staging/bcm/sort.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/bcm/sort.c b/drivers/staging/bcm/sort.c
index d518c42..ca0b179 100644
textsearch_find zeroes out the offset, but the control buffer (which may or may
not matter in this case) needs to be zeroed out as well.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
net/sched/em_text.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/sched/em_text.c b/net/sched
On Thu, Oct 09, 2014 at 09:05:21AM -0700, Omar Sandoval wrote:
textsearch_find zeroes out the offset, but the control buffer (which may or
may
not matter in this case) needs to be zeroed out as well.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
net/sched/em_text.c | 2 ++
1 file
textsearch_put() doesn't exist; this comment appears to be referring to
textsearch_destroy().
Signed-off-by: Omar Sandoval osan...@osandov.com
---
This patch applies to 3.17. There was a patch submitted previously which got
rid of this documentation (https://lkml.org/lkml/2014/9/6/128
The RCU-friendly string API used internally by BTRFS is generic enough for
common use. This doesn't add any new functionality, but instead just moves the
code and documents the existing API.
Signed-off-by: Omar Sandoval osan...@osandov.com
Reviewed-by: Josh Triplett j...@joshtriplett.org
Acked
On Mon, Sep 29, 2014 at 11:49:54PM +0200, David Sterba wrote:
On Mon, Sep 29, 2014 at 12:45:12PM -0700, Omar Sandoval wrote:
@@ -639,8 +640,7 @@ static int send_header(struct send_ctx *sctx)
- return write_buf(sctx-send_filp, hdr, sizeof(hdr
straightforward sparse
warnings still remaining.
Version 2 replaces an open-coded implementation of kernel_write in write_buf,
doesn't touch unrelated style issues, and add's David's Reviewed-by.
This patch series applies to 3.17-rc7.
Omar Sandoval (3):
btrfs: replace open-coded kernel_write
btrfs: fix
write_buf used by btrfs send has what is more or less a reimplementation of
kernel_write. This also gets rid of a sparse address space warning.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/btrfs/send.c | 21 ++---
1 file changed, 6 insertions(+), 15 deletions(-)
diff
Fix several sparse warnings that can easily be addressed with context
annotations. These annotations also provide some sort of documentation for the
internal helper functions.
Signed-off-by: Omar Sandoval osan...@osandov.com
Reviewed-by: David Sterba dste...@suse.cz
---
fs/btrfs/extent-tree.c
Several casts of ioctl fields from userspace are missing the __user annotation.
Signed-off-by: Omar Sandoval osan...@osandov.com
Reviewed-by: David Sterba dste...@suse.cz
---
fs/btrfs/ioctl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs
printk returns an integer; there's no reason for printk_ratelimited to swallow
it.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
include/linux/printk.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/printk.h b/include/linux/printk.h
index d78125f
The RCU-friendy string API used internally by BTRFS is generic enough for
common use. This doesn't add any new functionality, but instead just moves the
code and documents the existing API.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/btrfs/check-integrity.c | 6 +--
fs/btrfs/dev
on the return value from printk.
The second patch actually moves the RCU string library. Version 2 passes on the
return values from printk{,_ratelimited} and fixes some style issues.
Omar Sandoval (2):
Return a value from printk_ratelimited
Move BTRFS RCU string to common library
fs/btrfs
e58c52e69a9aef07c0089f9ce552fca96d42bce9 Mon Sep 17 00:00:00 2001
Message-Id: e58c52e69a9aef07c0089f9ce552fca96d42bce9.1416380574.git.osan...@osandov.com
From: Omar Sandoval osan...@osandov.com
Date: Tue, 18 Nov 2014 22:42:10 -0800
Subject: [PATCH] swap: use direct_IO for swap_readpage
Signed-off-by: Omar
On Thu, Nov 13, 2014 at 02:18:21AM -0800, Omar Sandoval wrote:
The RCU-friendly string API used internally by BTRFS is generic enough for
common use. This doesn't add any new functionality, but instead just moves the
code and documents the existing API.
Reviewed-by: Josh Triplett j
.
- Supporting COW swapfiles might also come with some weird edge cases?
This functionality is tenuously tested in a virtual machine with some
artificial workloads. Comment away.
Omar Sandoval (5):
direct-io: don't dirty ITER_BVEC pages on read
nfs: don't dirty ITER_BVEC pages read through direct I/O
As with the generic blockdev code, kernel pages shouldn't be dirtied by the
direct I/O path.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/nfs/direct.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 10bf072..a67fa2c
Implement the swap file a_ops on btrfs. Activation simply checks for a usable
swap file: it must be fully allocated (no holes), support direct I/O (so no
compressed or inline extents) and should be nocow (I'm not sure about that last
one).
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs
swap_activate will check for a compressed or copy-on-write file; we shouldn't
allow it to become either once it has already been activated.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/btrfs/ioctl.c | 50 +++---
1 file changed, 31 insertions
On Fri, Nov 21, 2014 at 02:06:57AM -0800, Christoph Hellwig wrote:
On Tue, Nov 18, 2014 at 11:22:35PM -0800, Omar Sandoval wrote:
Here's a nice little bit of insanity I put together in that direction --
consider it a discussion point more than a patch. It does two things:
- Uses
Sorry for the noise, looks like Christoph got back to me on the previous RFC
just before I sent this out -- disregard this for now.
--
Omar
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at
Reads through the iov_iter infrastructure for kernel pages shouldn't be dirtied
by the direct I/O code.
This is based on Dave Kleikamp's and Ming Lei's previously posted patches.
Cc: Dave Kleikamp dave.kleik...@oracle.com
Cc: Ming Lei ming@canonical.com
Signed-off-by: Omar Sandoval osan
-by: Omar Sandoval osan...@osandov.com
---
mm/page_io.c | 32
1 file changed, 28 insertions(+), 4 deletions(-)
diff --git a/mm/page_io.c b/mm/page_io.c
index 955db8b..10715e0 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -283,8 +283,7 @@ int __swap_writepage(struct
On Fri, Nov 21, 2014 at 07:00:45PM +0100, David Sterba wrote:
+ pr_err(BTRFS: swapfile has holes);
+ ret = -EINVAL;
+ goto out;
+ }
+ if (em-block_start == EXTENT_MAP_INLINE) {
+ pr_err(BTRFS:
On Sat, Nov 22, 2014 at 12:03:57PM -0800, Omar Sandoval wrote:
On Fri, Nov 21, 2014 at 07:00:45PM +0100, David Sterba wrote:
+ ret = -EINVAL;
+ goto out;
+ }
+ if (test_bit(EXTENT_FLAG_COMPRESSED, em-flags)) {
+ pr_err
On Fri, Nov 21, 2014 at 02:19:14AM -0800, Christoph Hellwig wrote:
On Fri, Nov 21, 2014 at 02:15:31AM -0800, Omar Sandoval wrote:
Sorry for the noise, looks like Christoph got back to me on the previous RFC
just before I sent this out -- disregard this for now.
If the NFS people are fine
The RCU-friendy string API used internally by BTRFS is generic enough for
common use. This doesn't add any new functionality, but instead just moves the
code and documents the existing API.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
This patch applies to 3.17-rc5.
fs/btrfs/check
Fix a few implicit casts between int and gfp_t which were caught by sparse.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
This patch applies to v3.17-rc6.
drivers/staging/lustre/lustre/llite/lloop.c| 4 ++--
drivers/staging/lustre/lustre/ptlrpc/client.c | 2
printk returns an integer; there's no reason for printk_ratelimited to swallow
it.
Signed-off-by: Omar Sandoval osan...@osandov.com
Acked-by: Paul E. McKenney paul...@linux.vnet.ibm.com
---
include/linux/printk.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include
string header and updates the BTRFS code that
depends on it. Version 3 adds the __rcu annotation to the relevant functions.
Version 3 also adds Paul's ack and Josh's review.
Omar Sandoval (2):
Return a value from printk_ratelimited
Move BTRFS RCU string to common library
fs/btrfs/check
The RCU-friendly string API used internally by BTRFS is generic enough for
common use. This doesn't add any new functionality, but instead just moves the
code and documents the existing API.
Signed-off-by: Omar Sandoval osan...@osandov.com
Reviewed-by: Josh Triplett j...@joshtriplett.org
Acked
On Fri, Sep 26, 2014 at 10:36:47PM -0700, Omar Sandoval wrote:
This patch series makes the generic RCU string library used internally by
BTRFS
accessible by anyone.
The first patch makes printk_ratelimited pass on the return value from printk.
Version 3 gives the temporary return variable
On Fri, Sep 26, 2014 at 10:48:11PM -0700, Joe Perches wrote:
I'd prefer to keep it the way it is actually.
I've submitted several patches to convert the int return
to void for printk derived functions recently.
Alright, it doesn't seem like anyone feels strongly for keeping the return
The RCU-friendly string API used internally by BTRFS is generic enough for
common use. This doesn't add any new functionality, but instead just moves the
code and documents the existing API.
Signed-off-by: Omar Sandoval osan...@osandov.com
Reviewed-by: Josh Triplett j...@joshtriplett.org
Acked
Fix several sparse warnings that can easily be addressed with context
annotations. These annotations also provide some sort of documentation for the
internal helper functions.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/btrfs/ctree.c| 3 ++-
fs/btrfs/extent-tree.c
The buffer passed to vfs_write in send and several casts of ioctl fields are
missing the __user annotation. Also fixes a couple of related trivial style
issues.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/btrfs/ioctl.c | 6 +++---
fs/btrfs/send.c | 8
2 files changed, 7
straightforward sparse
warnings still remaining.
Omar Sandoval (2):
btrfs: fix sparse address space warnings
btrfs: fix sparse lock context warnings
fs/btrfs/ctree.c| 3 ++-
fs/btrfs/extent-tree.c | 1 +
fs/btrfs/extent_io.c| 2 +-
fs/btrfs/free-space-cache.c | 1 +
fs/btrfs
On Sun, Sep 28, 2014 at 01:48:10AM -0700, Omar Sandoval wrote:
This patch series fixes some warnings reported by sparse when building the
btrfs module. It fixes two classes of warnings: address space warnings and
lock
context warnings. This didn't uncover any logical errors, but it reduces
On Sun, Sep 28, 2014 at 01:48:11AM -0700, Omar Sandoval wrote:
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 6528aa6..e0be577 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -515,7 +515,8 @@ static int write_buf(struct file *filp, const void *buf,
u32 len, loff_t *off
On Mon, Sep 29, 2014 at 06:07:38PM +0200, David Sterba wrote:
On Sun, Sep 28, 2014 at 01:48:11AM -0700, Omar Sandoval wrote:
The buffer passed to vfs_write in send and several casts of ioctl fields are
missing the __user annotation. Also fixes a couple of related trivial style
issues
Signed-off-by: Omar Sandoval osan...@osandov.com
---
Alright, here's one more go at it.
v7: Add arguments to kernel doc for printk wrappers, use ##__VA_ARGS
v6: Add header dependencies to rcustring.h
v5: Rebase against v3.18-rc3
v4: Don't return anything from the printk wrappers on the assumption
On Fri, Dec 12, 2014 at 11:51:22AM +0100, David Sterba wrote:
On Tue, Dec 09, 2014 at 05:45:48PM -0800, Omar Sandoval wrote:
+static void __clear_swapfile_extents(struct inode *inode)
+{
+ u64 isize = inode-i_size;
+ struct extent_map *em;
+ u64 start, len;
+
+ start = 0
On Fri, Dec 12, 2014 at 11:32:13AM +0100, David Sterba wrote:
On Tue, Dec 09, 2014 at 05:45:41PM -0800, Omar Sandoval wrote:
After some discussion on the mailing list, I decided that for simplicity and
reliability, it's best to simply disallow COW files and files with shared
extents (like
Reads through the iov_iter infrastructure for kernel pages shouldn't be
dirtied by the direct I/O code.
This is based on Dave Kleikamp's and Ming Lei's previously posted
patches.
Cc: Ming Lei ming@canonical.com
Acked-by: Dave Kleikamp dave.kleik...@oracle.com
Signed-off-by: Omar Sandoval
of direct_IO will expect to have it locked.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/nfs/direct.c | 12 +---
fs/nfs/file.c | 8 ++--
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 10bf072..9402b96 100644
-readpage. Using readpage for a
swapcache page requires all sorts of messy workarounds (see here for
context: https://lkml.org/lkml/2014/11/19/46). Patch 8 updates the
documentation accordingly.
Thanks!
Omar Sandoval (8):
nfs: follow direct I/O write locking convention
swap: lock i_mutex
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
As with the generic blockdev code, kernel pages shouldn't be dirtied by
the direct I/O path.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/nfs/direct.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 9402b96..a502b3f
Parameters were added to swap_activate in the same patch series that
introduced it without updating the documentation. Additionally, the
documentation claims that non-existent address space operations
swap_{in,out} are used for swap I/O, but it's (now) direct_IO.
Signed-off-by: Omar Sandoval osan
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/splice.c | 7 ++-
include/linux/uio.h | 2 ++
mm/iov_iter.c | 12
mm/page_io.c| 14 +-
4 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/fs/splice.c b/fs/splice.c
index
. This caters to the least common
denominator and avoids a sweeping change of every direct_IO
implementation for now.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
mm/page_io.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/page_io.c b/mm/page_io.c
index 1630ac0
On Mon, Nov 17, 2014 at 07:48:17AM -0800, Christoph Hellwig wrote:
With the new iov_iter infrastructure that supprots direct I/O to kernel
pages please get rid of the -readpage hack first. I'm still utterly
disapoined that this crap ever got merged.
Signed-off-by: Omar Sandoval osan
Signed-off-by: Omar Sandoval osan...@osandov.com
---
Chris, could you take a look at this again? It's just been rebased and should
be good to go. Thanks!
v5: Rebase against v3.18-rc3
v4: Don't return anything from the printk wrappers on the assumption that
printk will return void someday
v3: Add __rcu
Signed-off-by: Omar Sandoval osan...@osandov.com
---
Chris, if you haven't pulled this in yet, Joe Perches pointed out that
rcustring.h should include any headers it depends on. The following headers
take care of it:
#include linux/types.h
#include linux/compiler.h
#include linux/printk.h
#include
On Sat, Nov 08, 2014 at 08:13:37AM -0800, Joe Perches wrote:
On Sat, 2014-11-08 at 00:46 -0800, Omar Sandoval wrote:
The RCU-friendly string API used internally by BTRFS is generic enough for
common use. This doesn't add any new functionality, but instead just moves
the
code
on compressed or inline extents.
- Supporting COW swapfiles might come with some weird edge cases? This is
something that is probably good for discussion.
This functionality is tenuously tested in a virtual machine with some
artificial workloads. I'd really appreciate any comments.
Omar Sandoval (6
Implement the swap file a_ops on btrfs. Activation simply checks for a usable
swap file: it must be fully allocated (no holes), support direct I/O (so no
compressed or inline extents) and should be nocow (I'm not sure about that last
one).
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs
/compression.c does some shuffling around of the -mapping field
directly. We can't have a compressed swap file anyways, so I didn't touch that
file.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/btrfs/disk-io.c| 16 +++---
fs/btrfs/extent_io.c | 137
As pages in the swapcache get shuffled around and repurposed for different
pages in the swap file, the EXTENT_UPTODATE flag doesn't apply. This leads to
some really weird symptoms in userspace where pages in a process's address
space appear to get mixed up.
Signed-off-by: Omar Sandoval osan
swap_activate will check for a compressed or copy-on-write file; we shouldn't
allow it to become either once it has already been activated.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/btrfs/ioctl.c | 50 +++---
1 file changed, 31 insertions
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/btrfs/extent_io.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 54b2d00..b8dc256 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2904,13 +2904,14
Swapcache pages use -private to store the swp_entry_t; overwriting it is sure
to cause insanity.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/btrfs/extent_io.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index
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
, and not doing so is dangerous.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/nfs/inode.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 4bffe63..9205513 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -506,10 +506,15
On Thu, Dec 18, 2014 at 10:29:18PM -0800, Omar Sandoval wrote:
Most filesystems prevent truncation of an active swapfile by way of
inode_newsize_ok, called from inode_change_ok. NFS doesn't call either
from nfs_setattr, presumably because most of these checks are expected
to be done server
/-write_iter with an ITER_BVEC and let the
filesystem take care of it. This will also allow us to easily transition
to kernel AIO if that gets merged in the future.
Cc: Mel Gorman mgor...@suse.de
Signed-off-by: Omar Sandoval osan...@osandov.com
---
mm/page_io.c | 30 +++---
mm
Parameters were added to swap_activate in the same patch series that
introduced it without updating the documentation. Additionally, the
documentation claims that non-existent address space operations
-swap_{in,out} are used for swap I/O, but now we use
-{read,write}_iter.
Signed-off-by: Omar
As with the generic blockdev code, kernel pages shouldn't be dirtied by
the direct I/O path.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/nfs/direct.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 10bf072..b6ca65c
Reads through the iov_iter infrastructure for kernel pages shouldn't be
dirtied by the direct I/O code.
This is based on Dave Kleikamp's and Ming Lei's previously posted
patches.
Cc: Ming Lei ming@canonical.com
Acked-by: Dave Kleikamp dave.kleik...@oracle.com
Signed-off-by: Omar Sandoval
the generic swapfile interface to use -read_iter and
-write_iter instead of using -direct_IO directly in response to
discussion on the previous submission. It also adds the iov_iter_is_bvec
helper to factor out some common checks.
Version 1 can be found here: https://lkml.org/lkml/2014/12/15/7
Omar
Add iov_iter_is_bvec and iov_iter_bvec and convert callers.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/splice.c | 7 ++-
include/linux/uio.h | 7 +++
mm/iov_iter.c | 12
mm/page_io.c| 14 +-
4 files changed, 26 insertions
On Sat, Dec 20, 2014 at 06:01:30AM +, Al Viro wrote:
On Fri, Dec 19, 2014 at 07:18:26PM -0800, Omar Sandoval wrote:
Reads through the iov_iter infrastructure for kernel pages shouldn't be
dirtied by the direct I/O code.
This is based on Dave Kleikamp's and Ming Lei's previously
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. Swap
On Sat, Dec 20, 2014 at 06:13:37AM +, Al Viro wrote:
On Fri, Dec 19, 2014 at 07:18:28PM -0800, Omar Sandoval wrote:
+ ret = swap_file-f_op-read_iter(kiocb, to);
+ if (ret == PAGE_SIZE) {
+ SetPageUptodate(page
On Mon, Dec 15, 2014 at 07:49:20AM -0500, Trond Myklebust wrote:
On Mon, Dec 15, 2014 at 12:26 AM, Omar Sandoval osan...@osandov.com wrote:
The generic callers of direct_IO lock i_mutex before doing a write. NFS
doesn't use the generic write code, so it doesn't follow this
convention
On Mon, Dec 15, 2014 at 06:16:02AM +, Al Viro wrote:
On Sun, Dec 14, 2014 at 09:26:57PM -0800, Omar Sandoval wrote:
The rw argument to direct_IO has some ill-defined semantics. Some
filesystems (e.g., ext4, FAT) decide whether they're doing a write with
rw == WRITE, but others (e.g
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 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 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 Thu, Oct 09, 2014 at 02:48:54PM -0700, Cong Wang wrote:
On Thu, Oct 9, 2014 at 9:05 AM, Omar Sandoval osan...@osandov.com wrote:
textsearch_find zeroes out the offset, but the control buffer (which may or
may
not matter in this case) needs to be zeroed out as well.
Why
use of RCU in the BTRFS_IOC_DEV_INFO ioctl. The
third refactors the volume code's usage of rcu_string, fixing a questionable
RCU or two in the process.
This patch series applies to Chris' integration branch.
Thanks!
Omar Sandoval (3):
rcustring: clean up botched __rcu annotations
btrfs: fix
on. This introduces
some helper functions that factor out this functionality.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/btrfs/volumes.c | 93 +-
fs/btrfs/volumes.h | 2 +-
2 files changed, 65 insertions(+), 30 deletions(-)
diff --git a/fs/btrfs
The rcu_string returned by rcu_string_strdup isn't technically under RCU yet,
and it makes more sense not to treat it as such. Additionally, an rcu_string
passed to rcu_string_free should already be rcu_dereferenced and therefore not
in the __rcu address space.
Signed-off-by: Omar Sandoval osan
A naked read of the value of an RCU pointer isn't safe. Put the whole access in
an RCU critical section, not just the pointer dereference.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/btrfs/ioctl.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs
On Sun, Nov 30, 2014 at 10:26:43AM -0500, Pranith Kumar wrote:
On Sun, Nov 30, 2014 at 3:26 AM, Omar Sandoval osan...@osandov.com wrote:
The rcu_string API introduced some new sparse errors but also revealed
existing
ones. First of all, the name in struct btrfs_device should be annotated
On Sun, Nov 30, 2014 at 10:11:41AM -0500, Pranith Kumar wrote:
On Sun, Nov 30, 2014 at 3:26 AM, Omar Sandoval osan...@osandov.com wrote:
A naked read of the value of an RCU pointer isn't safe. Put the whole
access in
an RCU critical section, not just the pointer dereference.
Signed-off
v5: Rebase against v3.18-rc3
v4: Don't return anything from the printk wrappers on the assumption that
printk will return void someday
v3: Add __rcu annotation to relevant functions, add Paul's ack and Josh's
review
Omar Sandoval (3):
Move BTRFS RCU string to common library
btrfs: refactor
on.
This introduces some helper functions that factor out this
functionality.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/btrfs/volumes.c | 93 +-
fs/btrfs/volumes.h | 2 +-
2 files changed, 65 insertions(+), 30 deletions(-)
diff --git a/fs/btrfs
A naked read of the value of an RCU pointer isn't safe. Put the whole
access in an RCU critical section, not just the pointer dereference.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/btrfs/ioctl.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/btrfs/check-integrity.c | 6 +--
fs/btrfs/dev-replace.c | 19 -
fs/btrfs/disk-io.c | 6 +--
fs/btrfs/extent_io.c | 4 +-
fs/btrfs/ioctl.c | 4 +-
fs/btrfs/raid56.c | 2 +-
fs/btrfs/rcu-string.h
Extents mapping a swap file should remain pinned in memory in order to
avoid doing allocations to look up an extent when we're already low on
memory. Rather than overloading EXTENT_FLAG_PINNED, add a new flag
specifically for this purpose.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs
a surprising
inconsistency for users (in my opinion).
As with before, this functionality is tenuously tested in a virtual machine with
some artificial workloads, but it works for me. I'm pretty happy with the
results on my end, so please comment away.
Thanks!
Omar Sandoval (7):
direct-io
of
allocations for a COW when we're already low on memory
2. Pins the extent maps in memory with EXTENT_FLAG_SWAPFILE
Deactivation unpins all of the extent maps.
Signed-off-by: Omar Sandoval osan...@osandov.com
---
fs/btrfs/inode.c | 131 +++
1 file changed
1 - 100 of 773 matches
Mail list logo