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
Acked-by: Paul E. McKenney
Signed-off-by: Omar Sandoval
---
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
---
fs/btrfs/ioctl.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/
mption 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 btrfs_device->name updates
btrfs: fix suspicious RCU in BTRFS_IOC_DEV_INF
This introduces some helper functions that factor out this
functionality.
Signed-off-by: Omar Sandoval
---
fs/btrfs/volumes.c | 93 +-
fs/btrfs/volumes.h | 2 +-
2 files changed, 65 insertions(+), 30 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/
On Sat, Jan 10, 2015 at 11:56:48AM -0800, Paul E. McKenney wrote:
> On Fri, Jan 09, 2015 at 12:35:57PM -0800, Omar Sandoval wrote:
> > Hi, everyone,
> >
> > Now that the merge window and the holidays are over, I've rebased this on
> > v3.19-rc3 for the next merge
On Sat, Jan 10, 2015 at 05:08:03PM -0500, Trond Myklebust wrote:
> Hi Omar,
>
> On Thu, Jan 8, 2015 at 4:18 AM, Omar Sandoval wrote:
> > Most filesystems prevent truncation of an active swapfile by way of
> > inode_newsize_ok, called from inode_change_ok. NFS doesn
get_acl gets a reference which we must release in the error cases.
Signed-off-by: Omar Sandoval
---
fs/posix_acl.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/posix_acl.c b/fs/posix_acl.c
index 0855f77..f8f3cc2 100644
--- a/fs/posix_acl.c
+++ b/fs/posix_acl.c
On Wed, Apr 01, 2015 at 01:22:42PM +0200, David Sterba wrote:
> On Wed, Apr 01, 2015 at 12:03:28AM -0700, Omar Sandoval wrote:
> > --- a/fs/btrfs/super.c
> > +++ b/fs/btrfs/super.c
> > @@ -1024,6 +1024,10 @@ static int btrfs_show_options(struct seq_file *seq,
>
On Thu, Apr 02, 2015 at 05:02:25PM +0200, David Sterba wrote:
> On Wed, Apr 01, 2015 at 08:49:54PM -0700, Omar Sandoval wrote:
> > Hm, yeah, that's unfortunate, thanks for pointing that out. It looks
> > like we can get the subvolume ID reliably:
> >
> >
>
On Mon, Mar 30, 2015 at 02:30:34PM +0200, David Sterba wrote:
> On Mon, Mar 30, 2015 at 02:02:17AM -0700, Omar Sandoval wrote:
> > Before commit bafc9b754f75 ("vfs: More precise tests in d_invalidate"),
> > d_invalidate() could return -EBUSY when a dentry for a direct
On Tue, Mar 31, 2015 at 10:54:55PM -0500, Eric W. Biederman wrote:
> Omar Sandoval writes:
>
> > On Mon, Mar 30, 2015 at 02:30:34PM +0200, David Sterba wrote:
> >> On Mon, Mar 30, 2015 at 02:02:17AM -0700, Omar Sandoval wrote:
> >> > Before commit bafc9b75
create /mnt/vol1
btrfs subvol create /mnt/vol2
umount /mnt
mount -oro,subvol=/vol1 /dev/vdb /mnt
mount -orw,subvol=/vol2 /dev/vdb /mnt2
Fixes: 0723a0473fb4
Signed-off-by: Omar Sandoval
---
fs/btrfs/super.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/btrfs/super.c b/fs/btrfs/supe
ubvol=
case. To unify the code paths, when given subvolid= or using the default
subvolume ID, translate it into a subvolume name by walking
ROOT_BACKREFs in the root tree and INODE_REFs in the filesystem trees.
Signed-off-by: Omar Sandoval
---
fs/btrf
;ve tested it manually and with the
script below. Thank you!
Omar Sandoval (3):
Btrfs: lock superblock before remounting for rw subvol
Btrfs: unify subvol= and subvolid= mounting
Btrfs: show subvol= and subvolid= in /proc/mounts
fs/btrfs/sup
Currently, userspace has no way to know which subvolume is mounted. But,
now that we're guaranteed to have a meaningful root dentry, we can just
export and use seq_dentry() in btrfs_show_options(). The subvolume ID is
easy to get, so put that in there, too.
Signed-off-by: Omar Sandoval
--
On Wed, Apr 08, 2015 at 02:06:14PM +0800, Qu Wenruo wrote:
>
>
> Original Message
> Subject: [PATCH 2/3] Btrfs: unify subvol= and subvolid= mounting
> From: Omar Sandoval
> To: Chris Mason , Josef Bacik , David Sterba
> ,
> Date: 2015年04月08日 13:34
>
#0: (&type->i_mutex_dir_key){+.+.+.}, at: []
btrfs_ioctl_snap_destroy+0x2df/0x7a0
Make sure we unlock it in the error path.
Reviewed-by: Filipe Manana
Reviewed-by: David Sterba
Cc: sta...@vger.kernel.org
Signed-off-by: Omar Sandoval
---
Just resending this with Filipe's and David
check for that. This also makes setup_root_args() more
generic, which we'll need soon.
Signed-off-by: Omar Sandoval
---
fs/btrfs/super.c | 56
1 file changed, 20 insertions(+), 36 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/bt
In preparation for new functionality in mount_subvol(), give it
ownership of subvol_name and tidy up the error paths.
Signed-off-by: Omar Sandoval
---
fs/btrfs/super.c | 61 ++--
1 file changed, 33 insertions(+), 28 deletions(-)
diff --git a
create /mnt/vol1
btrfs subvol create /mnt/vol2
umount /mnt
mount -oro,subvol=/vol1 /dev/vdb /mnt
mount -orw,subvol=/vol2 /dev/vdb /mnt2
Fixes: 0723a0473fb4 ("btrfs: allow mounting btrfs subvolumes with different
ro/rw options")
Signed-off-by: Omar Sandoval
---
fs/btrfs/super.c | 2 ++
1
0-rc7. Tested manually and with the script
below (updated from v1).
Thanks!
Omar Sandoval (6):
Btrfs: lock superblock before remounting for rw subvol
Btrfs: remove all subvol options before mounting top-level
Btrfs: clean up error handling in mount_subvol()
Btrfs: fail on mismatched subvo
t of /proc/mounts).
Signed-off-by: Omar Sandoval
---
fs/btrfs/super.c | 32
1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index ab100e5..20b470d 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1163
On Thu, Apr 09, 2015 at 06:28:48PM +0200, David Sterba wrote:
> On Tue, Apr 07, 2015 at 10:34:01PM -0700, Omar Sandoval wrote:
> > Currently, mounting a subvolume with subvolid= takes a different code
> > path than mounting with subvol=. This isn't really a big deal except f
ubvol=
case. To unify the code paths, when given subvolid= or using the default
subvolume ID, translate it into a subvolume name by walking
ROOT_BACKREFs in the root tree and INODE_REFs in the filesystem trees.
Signed-off-by: Omar Sandoval
---
fs/btrf
Now that we're guaranteed to have a meaningful root dentry, we can just
export seq_dentry() and use it in btrfs_show_options(). The subvolume ID
is easy to get and can also be useful, so put that in there, too.
Signed-off-by: Omar Sandoval
---
fs/btrfs/super.c | 4
fs/seq_file.c
On Fri, Mar 27, 2015 at 02:06:49PM -0700, Omar Sandoval wrote:
> On Fri, Mar 13, 2015 at 12:43:42PM -0700, Omar Sandoval wrote:
> > On Fri, Mar 13, 2015 at 12:04:30PM +0100, David Sterba wrote:
> > > On Wed, Mar 11, 2015 at 09:40:17PM -0700, Omar Sandoval wrote:
> > > &
On Fri, Apr 10, 2015 at 02:20:40PM -0700, Omar Sandoval wrote:
> Whenever the check for a send in progress introduced in commit
> 521e0546c970 (btrfs: protect snapshots from deleting during send) is
> hit, we return without unlocking inode->i_mutex. This is easy to see
> with
Since kernel commit, 8e1e1df29d83 ("tracing: Add additional marks to
signal very large time deltas") the kernel annotates durations longer
than 1000 usecs with # and longer than 1 sec with $. Update trace-cmd
report to be consistent with it.
Signed-off-by: Omar Sandoval
---
Just a mino
On Tue, May 22, 2018 at 10:48:29PM +0800, Jianchao Wang wrote:
> Currently, kyber is very unfriendly with merging. kyber depends
> on ctx rq_list to do merging, however, most of time, it will not
> leave any requests in ctx rq_list. This is because even if tokens
> of one domain is used up, kyber w
On Mon, Apr 02, 2018 at 04:49:39PM -0700, Linus Torvalds wrote:
> On Mon, Apr 2, 2018 at 4:37 PM, Linus Torvalds
> wrote:
> >
> > We should probably have at least switched it to "unsigned long int"
>
> I meant just "unsigned int", of course.
>
> Right now we occasionally have a silly 64-bit fiel
Just wanted to make sure this doesn't get missed because I misspelled
the stable email address in the patch. It applies to v4.13+.
On Fri, Apr 20, 2018 at 10:17:42AM +0200, Peter Zijlstra wrote:
> On Sun, Apr 15, 2018 at 12:42:25AM -0700, Omar Sandoval wrote:
> > From: Omar Sandoval
> >
> > While revisiting my Btrfs swapfile series [1], I introduced a situation
> > in which reclaim would lock i
t able to reproduce the hang, but this looks correct, and it
passed my tests.
Reviewed-by: Omar Sandoval
> ---
> v2:
> - Change the commit message
> - Change from sbitmap::depth to 2^sbitmap::shift
> ---
> block/kyber-iosched.c | 29 +
> 1 file cha
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
---
The following program will immediately cause a kernel oops:
.globl _start
_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
> ---
KGDB_COMPILED_BREAK on ARM, or
brk #KGDB_{DYN,COMPILED}_DGB_BRK_IMM on ARM64.
Signed-off-by: Omar Sandoval
---
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
>
KGDB_COMPILED_BREAK.
Signed-off-by: Omar Sandoval
---
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 insertions(+)
diff
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 t
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
---
This patch applies to 3.17-rc5.
fs/btrfs/check-integrity.c
printk returns an integer; there's no reason for printk_ratelimited to swallow
it.
Signed-off-by: Omar Sandoval
---
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..67534bc 100644
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
---
fs/btrfs/check-integrity.c | 6 +--
fs/btrfs/dev-replace.c
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
Fix a few implicit casts between int and gfp_t which were caught by sparse.
Signed-off-by: Omar Sandoval
---
This patch applies to v3.17-rc6.
drivers/staging/lustre/lustre/llite/lloop.c| 4 ++--
drivers/staging/lustre/lustre/ptlrpc/client.c | 2 +-
drivers/staging/lustre
printk returns an integer; there's no reason for printk_ratelimited to swallow
it.
Signed-off-by: Omar Sandoval
Acked-by: Paul E. McKenney
---
include/linux/printk.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/printk.h b/include/linux/printk.h
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/b
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
Reviewed-by: Josh Triplett
Acked-by: Paul E. McKenney
---
fs/btrfs/
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 th
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
val
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
Reviewed-by: Josh Triplett
Acked-by: Paul E. McKenney
---
Vers
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
---
fs/btrfs/ctree.c| 3 ++-
fs/btrfs/extent-tree.c | 1 +
fs/btrfs
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
---
fs/btrfs/ioctl.c | 6 +++---
fs/btrfs/send.c | 8
2 files changed, 7 insertions(+), 7
less 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/
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 logic
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,
> u3
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 s
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-&
less 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 kerne
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
---
fs/btrfs/send.c | 21 ++---
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/fs/btrfs
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
Reviewed-by: David Sterba
---
fs/btrfs/extent-tree.c | 1 +
fs/btrfs/extent_io.c
Several casts of ioctl fields from userspace are missing the __user annotation.
Signed-off-by: Omar Sandoval
Reviewed-by: David Sterba
---
fs/btrfs/ioctl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 8a8e298..0f9a5a1
Fix checkpatch.pl "Alignment should match open parenthesis".
Signed-off-by: Omar Sandoval
---
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
---
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
Reviewed-by: Josh Triplett
Acked-by: Paul E. McKenney
---
Vers
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
Acked-by: Paul E. McKenney
Signed-off-by: Omar Sandoval
---
Chris, coul
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
Acked-by: Paul E. McKenney
Signed-off-by: Omar Sandoval
---
Chris, i
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
On Mon, Jul 13, 2015 at 02:43:19PM -0400, Steven Rostedt wrote:
> On Wed, 24 Jun 2015 11:36:54 -0700
> Omar Sandoval wrote:
>
> > Since kernel commit, 8e1e1df29d83 ("tracing: Add additional marks to
> > signal very large time deltas") the kernel annotates durat
From: Omar Sandoval
Al, could you please apply this series for v4.7? I first sent it out
during the v4.5 cycle, it'd be great to be done with it, especially
since it's fixing a regression.
Here's the cover letter from v1:
http://www.spinics.net/lists/linux-fsdevel/msg94735.html
From: Omar Sandoval
cprm->written is redundant with cprm->file->f_pos, so use that instead.
Signed-off-by: Omar Sandoval
---
arch/powerpc/platforms/cell/spufs/coredump.c | 5 +++--
fs/binfmt_elf.c | 2 +-
fs/binfmt_elf_fdpic.c|
From: Omar Sandoval
Commit 9b56d54380ad ("dump_skip(): dump_seek() replacement taking
coredump_params") introduced a regression with regard to RLIMIT_CORE.
Previously, when a core dump was sparse, only the data that was actually
written out would count against the limit. Now, the spa
y of this, so please let me know if I'm spewing
nonsense :)
--
Omar
>From e58c52e69a9aef07c0089f9ce552fca96d42bce9 Mon Sep 17 00:00:00 2001
Message-Id:
From: Omar Sandoval
Date: Tue, 18 Nov 2014 22:42:10 -0800
Subject: [PATCH] swap: use direct_IO for swap_readpage
S
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.
>
> Review
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
Acked-by: Paul E. McKenney
Signed-off-by: Omar Sandoval
---
Alright, h
e first patch fixes the __rcu annotations which I got wrong on the first go.
The second fixes an incorrect 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&
This introduces
some helper functions that factor out this functionality.
Signed-off-by: Omar Sandoval
---
fs/btrfs/volumes.c | 93 +-
fs/btrfs/volumes.h | 2 +-
2 files changed, 65 insertions(+), 30 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/
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 San
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
---
fs/btrfs/ioctl.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/
On Sun, Nov 30, 2014 at 10:26:43AM -0500, Pranith Kumar wrote:
> On Sun, Nov 30, 2014 at 3:26 AM, Omar Sandoval 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 a
On Sun, Nov 30, 2014 at 10:11:41AM -0500, Pranith Kumar wrote:
> On Sun, Nov 30, 2014 at 3:26 AM, Omar Sandoval 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 derefere
es
with either for swap.
- 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
As with the generic blockdev code, kernel pages shouldn't be dirtied by the
direct I/O path.
Signed-off-by: Omar Sandoval
---
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 100644
--- a/f
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
---
fs/btrfs/inode.c
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
---
fs/btrfs/ioctl.c | 50 +++---
1 file changed, 31 insertions(+), 19 dele
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 thi
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 http
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
Cc: Ming Lei
Signed-off-by: Omar Sandoval
---
fs/direct-io.c | 8 +---
1
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.
Cc: Mel Gorman
Si
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) {
> > + p
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
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.
>
>
fic to BTRFS:
- We can't do direct I/O 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'
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
---
fs/btrfs/inode.c
foolproof.
fs/btrfs/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
---
fs/btrfs/disk-io.c| 16 +++---
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 Sandova
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
---
fs/btrfs/ioctl.c | 50 +++---
1 file changed, 31 insertions(+), 19 dele
Signed-off-by: Omar Sandoval
---
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 @@ static int
Swapcache pages use ->private to store the swp_entry_t; overwriting it is sure
to cause insanity.
Signed-off-by: Omar Sandoval
---
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 9b67b37..54b2
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-o
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
---
net/sched/em_text.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/sched/em_text.c b/net/sched/em_text.c
index
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
> ---
> net/sched/em_text.c | 2 ++
101 - 200 of 390 matches
Mail list logo