Re: [PATCH] btrfs: fix potential null pointer dereference bug

2013-01-24 Thread Josef Bacik
On Sat, Jan 19, 2013 at 08:27:45AM -0700, Cong Ding wrote: > The bug happens when rb_node == NULL. It causes variable node to be NULL and > then the NULL pointer is dereferenced this line: > BUG_ON((struct btrfs_root *)node->data != root); > > Based on my analysis, function tree_search shoul

Re: btrfs crash when low on memory.

2013-02-27 Thread Josef Bacik
On Tue, Feb 26, 2013 at 10:22:47PM -0700, Dave Jones wrote: > Something I've yet to repeat managed to leak a whole bunch of memory > while I was travelling, and locked up my workstation. > > When I got home, this was the last thing printed out before it locked up > (it did make it into the logs th

Re: btrfs crash when low on memory.

2013-02-27 Thread Josef Bacik
On Wed, Feb 27, 2013 at 07:31:11AM -0700, Ahmet Inan wrote: > > Yeah we have a lot of > > > > ptr = kmalloc(); > > BUG_ON(ptr); > > > > everywhere. I'll fix this one up but I really need to sit down and go > > through > > all of them and make sure we do the right thing in all these places. > >

Re: btrfs crash when low on memory.

2013-02-27 Thread Josef Bacik
On Wed, Feb 27, 2013 at 3:10 PM, Ahmet Inan wrote: > On Wed, Feb 27, 2013 at 7:26 PM, Josef Bacik wrote: >> On Wed, Feb 27, 2013 at 07:31:11AM -0700, Ahmet Inan wrote: >>> > Yeah we have a lot of >>> > >>> > ptr = kmalloc(); >>> > BUG_ON(

[PATCH] jbd: fix assertion failure in journal_next_log_block

2008-01-31 Thread Josef Bacik
t reproduce the assertion, I could very easily reproduce the situation where t_outstanding_credits was < than t_nr_buffers. Signed-off-by: Josef Bacik <[EMAIL PROTECTED]> diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index 31853eb..e385a5c 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c @

Re: [PATCH] jbd: fix assertion failure in journal_next_log_block

2008-01-31 Thread Josef Bacik
On Thu, Jan 31, 2008 at 12:35:43PM -0700, Andreas Dilger wrote: > On Jan 31, 2008 11:14 -0500, Josef Bacik wrote: > [snip excellent analysis] > > So you get into this situation where > > t_nr_buffers (the actual number of buffers that are on the transaction) is > > gr

Re: [PATCH] jbd: fix assertion failure in journal_next_log_block

2008-02-05 Thread Josef Bacik
On Tuesday 05 February 2008 12:27:31 pm Jan Kara wrote: > Hello, > > Sorry for replying a bit late but I'm currently falling behind in > maling-list reading... > > > The way jbd tries to determine if there is enough space left on the > > journal in order to start a new transaction is looking at

Re: [PATCH] rwsem: add rwsem_is_contended

2013-09-16 Thread Josef Bacik
On Mon, Sep 16, 2013 at 04:05:47PM -0700, Andrew Morton wrote: > On Fri, 30 Aug 2013 10:14:01 -0400 Josef Bacik wrote: > > > Btrfs uses an rwsem to control access to its extent tree. Threads will > > hold a > > read lock on this rwsem while they scan the extent tree,

Re: [PATCH] rwsem: add rwsem_is_contended

2013-09-16 Thread Josef Bacik
On Mon, Sep 16, 2013 at 06:08:42PM -0700, David Daney wrote: > On 09/16/2013 05:37 PM, Peter Hurley wrote: > >On 09/16/2013 08:29 PM, David Daney wrote: > >>On 09/16/2013 05:05 PM, Josef Bacik wrote: > >>>On Mon, Sep 16, 2013 at 04:05:47PM -0700, Andrew Morton wrote

[PATCH 1/2] rwsem: add rwsem_is_contended V2

2013-09-19 Thread Josef Bacik
on to the rwsem in either read or write. Thanks, Signed-off-by: Josef Bacik --- V1->V2: took everybodys suggestions and simplified it to just one function in rwsem.h so it works for both the spinlock case and non-spinlock case. include/linux/rwsem.h | 13 + 1 file changed, 13 in

[PATCH 2/2] Btrfs: stop caching thread if extetn_commit_sem is contended

2013-09-19 Thread Josef Bacik
ned-off-by: Josef Bacik --- fs/btrfs/extent-tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index cfb3cf7..cc074c34 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -442,7 +442

Re: [PATCH 1/2] rwsem: add rwsem_is_contended V2

2013-09-19 Thread Josef Bacik
On Thu, Sep 19, 2013 at 06:57:27PM -0400, Peter Hurley wrote: > On 09/19/2013 11:48 AM, Josef Bacik wrote: > >Btrfs needs a simple way to know if it needs to let go of it's read lock on a > >rwsem. Introduce rwsem_is_contended to check to see if there are any > &g

Re: [PATCH] rwsem: add rwsem_is_contended

2013-09-04 Thread Josef Bacik
On Wed, Sep 04, 2013 at 07:46:56AM -0400, Peter Hurley wrote: > On 09/03/2013 09:18 AM, Josef Bacik wrote: > >On Mon, Sep 02, 2013 at 01:18:08PM -0400, Peter Hurley wrote: > >>On 09/01/2013 04:32 AM, Michel Lespinasse wrote: > >>>Hi Josef, > >>> > &g

Re: [PATCH v3] btrfs: Fix memory leakage in the tree-log.c

2013-10-09 Thread Josef Bacik
On Wed, Oct 09, 2013 at 08:40:30PM -0300, Geyslan G. Bem wrote: > In some cases, add_inode_ref() is returning without freeing > the 'name' pointer. > > Added bail out to explicitly call kfree when necessary. > > Signed-off-by: Geyslan G. Bem > --- > fs/btrfs/tree-log.c | 10 -- > 1 file

[PATCH] rwsem: add rwsem_is_contended

2013-08-30 Thread Josef Bacik
allow the commit to continue. Thanks, Signed-off-by: Josef Bacik --- I've cc'ed people who seemed like they may be in charge/familiar with this code, hopefully I got the right people. include/linux/rwsem.h |1 + lib/rwsem.c | 17 + 2 files changed, 18 insert

Re: [PATCH] rwsem: add rwsem_is_contended

2013-09-03 Thread Josef Bacik
On Mon, Sep 02, 2013 at 01:18:08PM -0400, Peter Hurley wrote: > On 09/01/2013 04:32 AM, Michel Lespinasse wrote: > >Hi Josef, > > > >On Fri, Aug 30, 2013 at 7:14 AM, Josef Bacik wrote: > >>Btrfs uses an rwsem to control access to its extent tree. Threads will &g

Re: [PATCH] rwsem: add rwsem_is_contended

2013-09-03 Thread Josef Bacik
On Sun, Sep 01, 2013 at 01:32:36AM -0700, Michel Lespinasse wrote: > Hi Josef, > > On Fri, Aug 30, 2013 at 7:14 AM, Josef Bacik wrote: > > Btrfs uses an rwsem to control access to its extent tree. Threads will > > hold a > > read lock on this rwsem while they s

Re: [PATCH] rwsem: add rwsem_is_contended

2013-09-03 Thread Josef Bacik
On Sat, Aug 31, 2013 at 04:51:36PM +0200, Peter Zijlstra wrote: > On Fri, Aug 30, 2013 at 10:14:01AM -0400, Josef Bacik wrote: > > Btrfs uses an rwsem to control access to its extent tree. Threads will > > hold a > > read lock on this rwsem while they scan th

Re: [PATCH 2/2] Btrfs: stop caching thread if extetn_commit_sem is contended

2013-09-26 Thread Josef Bacik
On Fri, Sep 20, 2013 at 07:12:47AM +0200, Ingo Molnar wrote: > > * Josef Bacik wrote: > > > We can starve out the transaction commit with a bunch of caching threads > > all running at the same time. This is because we will only drop the > > extent_commit_sem if we

[PATCH 2/2] Btrfs: stop caching thread if extent_commit_sem is contended

2013-09-26 Thread Josef Bacik
ead-locked and a writer arrives? They'd all rush to try to release the fs_info->extent_commit_sem, and they'd block in the down_read() because there's a writer waiting. So there's a guarantee of forward progress. This should answer akpm's concern I think. Thanks, Acked-by: Ingo M

[PATCH 1/2] rwsem: add rwsem_is_contended V3

2013-09-26 Thread Josef Bacik
on to the rwsem in either read or write. Thanks, Signed-off-by: Josef Bacik --- V2->V3: fixed the comment and simplified the function as per Peter's suggestions. V1->V2: took everybodys suggestions and simplified it to just one function in rwsem.h so it works for both the spinl

Re: [PATCH] btrfs: fix disk-io.c/btrfs_read_dev_super with BTRFS_SUPER_MIRROR_MAX to control the loops

2012-09-10 Thread Josef Bacik
On Mon, Sep 10, 2012 at 12:38:35AM -0600, Wang Sheng-Hui wrote: > To check the duplicated super blocks, use BTRFS_SUPER_MIRROR_MAX > as the loops limit. > > Signed-off-by: Wang Sheng-Hui > --- > fs/btrfs/disk-io.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/fs

Re: btrfs triggered lockdep WARN.

2013-06-27 Thread Josef Bacik
On Thu, Jun 27, 2013 at 10:58:24AM -0400, Dave Jones wrote: > Another bug caused by this script. > https://github.com/kernelslacker/io-tests/blob/master/setup.sh > > WARNING: at kernel/lockdep.c:708 __lock_acquire+0x183b/0x1b70() > Modules linked in: sctp lec bridge 8021q garp stp mrp fuse dlci t

Re: btrfs zero divide (was: Re: Linux 3.10 problem reports (yes, plural))

2013-07-30 Thread Josef Bacik
On Tue, Jul 30, 2013 at 11:07:30AM +0200, Geert Uytterhoeven wrote: > On Tue, 30 Jul 2013, Thorsten Glaser wrote: > > NEW problem: btrfs doesn’t work at all. I had to reboot my > > buildd into 3.2 using echo s/u/s/o >/proc/sysrq-trigger as > > the attempt to mount it left the system hanging there.

Re: btrfs zero divide

2013-07-30 Thread Josef Bacik
On Tue, Jul 30, 2013 at 07:02:29PM +, Thorsten Glaser wrote: > Josef Bacik dixit: > > >Can you gdb btrfs.ko and do > > > >list *(__btrfs_map_block+0x11c) > > Not easily (the kernel image is from a .deb package), > and even in a compile tree gdb just says:

[GIT PULL] btrfs update

2013-07-19 Thread Josef Bacik
f a recent pull of your tree, hopefully that's the right thing. Thanks, Josef Bacik (3): Btrfs: update drop progress before stopping snapshot dropping Btrfs: fix lock leak when resuming snapshot deletion Btrfs: re-add root to dead root list if we stop dropping it Stefan Behr

Re: btrfs zero divide

2013-08-09 Thread Josef Bacik
On Fri, Aug 09, 2013 at 02:30:38PM +0200, Andreas Schwab wrote: > Andreas Schwab writes: > > > Josef Bacik writes: > > > >> So stripe_len shouldn't be 0, if it is you have bigger problems :). > > > > The bigger problem is that stripe_nr is u64, this i

[PATCH] fix panic in jbd by adding locks

2007-08-14 Thread Josef Bacik
orrect (at least I think so :) fix. Thank you, Signed-off-by: Josef Bacik <[EMAIL PROTECTED]> diff --git a/fs/jbd/revoke.c b/fs/jbd/revoke.c index 62e13c8..317f598 100644 --- a/fs/jbd/revoke.c +++ b/fs/jbd/revoke.c @@ -518,6 +518,7 @@ void journal_write_revoke_records(journal_t *journal,

Re: [PATCH] fix panic in jbd by adding locks

2007-08-15 Thread Josef Bacik
On Wed, Aug 15, 2007 at 01:37:37PM +0200, Jan Kara wrote: > Hello, > > > It is possible to panic the box by a race condition that exists in the > > journalling code where we do not take the j_revoke_lock when traversing the > > journal's revoked record list. This patch has been tested and we ha

Re: [PATCH] fix panic in jbd by adding locks

2007-08-16 Thread Josef Bacik
On Thu, Aug 16, 2007 at 06:08:35PM +0200, Jan Kara wrote: > Hello, > > > > > It is possible to panic the box by a race condition that exists in the > > > > journalling code where we do not take the j_revoke_lock when traversing > > > > the > > > > journal's revoked record list. This patch has

[RFC][PATCH] fix for async scsi scan sysfs problem

2007-04-18 Thread Josef Bacik
Hello, I'm having a problem on the newest version of linus's git tree with my qla2xxx card. This is on a UP box, the problem doesn't happen on my similarly configured SMP box. When I unload and then try to load the qla2xxx driver again I get this message kobject_add failed for 3:0:0:0 with -EEX

[RFC][PATCH] fix for async scsi scan sysfs problem (resend)

2007-04-19 Thread Josef Bacik
Hello, Resending this to a wider audience (thanks Andrew). I'm having a problem on the newest version of linus's git tree with my qla2xxx card. This is on a UP box, the problem doesn't happen on my similarly configured SMP box. When I unload and then try to load the qla2xxx driver again I ge

Re: [RFC][PATCH] fix for async scsi scan sysfs problem (resend)

2007-04-19 Thread Josef Bacik
On Thu, Apr 19, 2007 at 10:02:36AM -0400, James Bottomley wrote: > On Thu, 2007-04-19 at 09:25 -0400, Josef Bacik wrote: > > Looking through everything I came to the conclusion that we don't really > > need > > the scsi_sysfs_add_devices in scsi_finish_async_scan, whi

Re: [RFC][PATCH] fix for async scsi scan sysfs problem (resend)

2007-04-21 Thread Josef Bacik
On Sat, Apr 21, 2007 at 12:23:45AM -0700, Andrew Morton wrote: > On Thu, 19 Apr 2007 11:06:56 -0400 Josef Bacik <[EMAIL PROTECTED]> wrote: > > > On Thu, Apr 19, 2007 at 10:02:36AM -0400, James Bottomley wrote: > > > On Thu, 2007-04-19 at 09:25 -0400, Josef Bacik wro

Re: [RFC][PATCH] fix for async scsi scan sysfs problem (resend)

2007-04-23 Thread Josef Bacik
On Sat, Apr 21, 2007 at 09:59:56AM -0400, Josef Bacik wrote: > On Sat, Apr 21, 2007 at 12:23:45AM -0700, Andrew Morton wrote: > > On Thu, 19 Apr 2007 11:06:56 -0400 Josef Bacik <[EMAIL PROTECTED]> wrote: > > > > > On Thu, Apr 19, 2007 at 10:02:36AM -0400, James B

[RESEND][PATCH 0/5] nbd improvements

2016-09-08 Thread Josef Bacik
Apologies if you are getting this a second time, it appears vger ate my last submission. -- This is a patch series aimed at bringing NBD into 2016. The two big components of this series is converting nbd over to using blkmq and

[PATCH 3/5] nbd: use flags instead of bool

2016-09-08 Thread Josef Bacik
In preparation for some future changes, change a few of the state bools over to normal bits to set/clear properly. Signed-off-by: Josef Bacik --- drivers/block/nbd.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c

[PATCH 2/5] nbd: don't shutdown sock with irq's disabled

2016-09-08 Thread Josef Bacik
We hit a warning when shutting down the nbd connection because we have irq's disabled. We don't really need to do the shutdown under the lock, just clear the nbd->sock. So do the shutdown outside of the irq. This gets rid of the warning. Signed-off-by: Josef Bacik --- driver

[PATCH 1/5] nbd: convert to blkmq

2016-09-08 Thread Josef Bacik
This moves NBD over to using blkmq, which allows us to get rid of the NBD wide queue lock and the async submit kthread. We will start with 1 hw queue for now, but I plan to add multiple tcp connection support in the future and we'll fix how we set the hwqueue's. Signed-off-by: J

[PATCH 4/5] nbd: allow block mq to deal with timeouts

2016-09-08 Thread Josef Bacik
Instead of rolling our own timer, just utilize the blk mq req timeout and do the disconnect if any of our commands timeout. Signed-off-by: Josef Bacik --- drivers/block/nbd.c | 51 ++- 1 file changed, 14 insertions(+), 37 deletions(-) diff --git

[PATCH 5/5] nbd: add multi-connection support

2016-09-08 Thread Josef Bacik
-process cases. Thanks, Signed-off-by: Josef Bacik --- drivers/block/nbd.c | 267 1 file changed, 143 insertions(+), 124 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 4c6dd1a..4aa45ed 100644 --- a/drivers/block/nbd.c

Re: [Nbd] [RESEND][PATCH 0/5] nbd improvements

2016-09-15 Thread Josef Bacik
On 09/15/2016 09:17 AM, Wouter Verhelst wrote: On Thu, Sep 15, 2016 at 01:44:29PM +0100, Alex Bligh wrote: On 15 Sep 2016, at 13:41, Christoph Hellwig wrote: On Thu, Sep 15, 2016 at 01:39:11PM +0100, Alex Bligh wrote: That's probably right in the case of file-based back ends that are runnin

[PATCH][V2] nbd: add multi-connection support

2016-09-15 Thread Josef Bacik
-process cases. Thanks, Signed-off-by: Josef Bacik --- V1->V2: -Dropped the index from nbd_cmd and just used the hctx->queue_num as HCH suggested -Added the pid attribute back to the /sys/block/nbd*/ directory for the recv pid. -Reworked the disconnect to simply send the command on all conne

Re: [PATCH] btrfs: let btrfs_delete_unused_bgs() to clean relocated bgs

2016-09-02 Thread Josef Bacik
On 09/02/2016 03:46 AM, Naohiro Aota wrote: Currently, btrfs_relocate_chunk() is removing relocated BG by itself. But the work can be done by btrfs_delete_unused_bgs() (and it's better since it trim the BG). Let's dedupe the code. While btrfs_delete_unused_bgs() is already hitting the relocated

[PATCH 1/2] bpf: add a bpf_override_function helper

2017-10-31 Thread Josef Bacik
From: Josef Bacik Error injection is sloppy and very ad-hoc. BPF could fill this niche perfectly with it's kprobe functionality. We could make sure errors are only triggered in specific call chains that we care about with very specific situations. Accomplish this wit

[PATCH 2/2] samples/bpf: add a test for bpf_override_return

2017-10-31 Thread Josef Bacik
From: Josef Bacik This adds a basic test for bpf_override_return to verify it works. We override the main function for mounting a btrfs fs so it'll return -ENOMEM and then make sure that trying to mount a btrfs fs will fail. Signed-off-by: Josef Bacik --- samples/bpf/Mak

[PATCH 0/2][v2] Add the ability to do BPF directed error injection

2017-10-31 Thread Josef Bacik
v1->v2: - moved things around to make sure that bpf_override_return could really only be used for an ftrace kprobe. - killed the special return values from trace_call_bpf. - renamed pc_modified to bpf_kprobe_state so bpf_override_return could tell if it was being called from an ftrace kprobe co

[PATCH 0/2][v3] Add the ability to do BPF directed error injection

2017-11-01 Thread Josef Bacik
I'm sending this through Dave since it'll conflict with other BPF changes in his tree, but since it touches tracing as well Dave would like a review from somebody on the tracing side. v2->v3: - added a ->kprobe_override flag to bpf_prog. - added some sanity checks to disallow attaching bpf progs t

[PATCH 2/2] samples/bpf: add a test for bpf_override_return

2017-11-01 Thread Josef Bacik
From: Josef Bacik This adds a basic test for bpf_override_return to verify it works. We override the main function for mounting a btrfs fs so it'll return -ENOMEM and then make sure that trying to mount a btrfs fs will fail. Signed-off-by: Josef Bacik --- samples/bpf/Mak

[PATCH 1/2] bpf: add a bpf_override_function helper

2017-11-01 Thread Josef Bacik
From: Josef Bacik Error injection is sloppy and very ad-hoc. BPF could fill this niche perfectly with it's kprobe functionality. We could make sure errors are only triggered in specific call chains that we care about with very specific situations. Accomplish this wit

[PATCH 1/2] bpf: add a bpf_override_function helper

2017-11-02 Thread Josef Bacik
From: Josef Bacik Error injection is sloppy and very ad-hoc. BPF could fill this niche perfectly with it's kprobe functionality. We could make sure errors are only triggered in specific call chains that we care about with very specific situations. Accomplish this wit

[PATCH 2/2] samples/bpf: add a test for bpf_override_return

2017-11-02 Thread Josef Bacik
From: Josef Bacik This adds a basic test for bpf_override_return to verify it works. We override the main function for mounting a btrfs fs so it'll return -ENOMEM and then make sure that trying to mount a btrfs fs will fail. Acked-by: Alexei Starovoitov Signed-off-by: Josef

[PATCH 0/2][v4] Add the ability to do BPF directed error injection

2017-11-02 Thread Josef Bacik
I'm sending this through Dave since it'll conflict with other BPF changes in his tree, but since it touches tracing as well Dave would like a review from somebody on the tracing side. v3->v4: - fix a build error found by kbuild test bot (I didn't wait long enough apparently.) - Added a warning m

Re: [PATCH 1/2] bpf: add a bpf_override_function helper

2017-11-11 Thread Josef Bacik
On Sat, Nov 11, 2017 at 09:14:55AM +0100, Ingo Molnar wrote: > > * Josef Bacik wrote: > > > On Fri, Nov 10, 2017 at 10:34:59AM +0100, Ingo Molnar wrote: > > > > > > * Josef Bacik wrote: > > > > > > > @@ -551,6 +578,10 @@ static const

Re: [PATCH 1/2] bpf: add a bpf_override_function helper

2017-11-13 Thread Josef Bacik
On Sun, Nov 12, 2017 at 11:38:24AM +0100, Ingo Molnar wrote: > > * Alexei Starovoitov wrote: > > > > One of the major advantages of having an in-kernel BPF sandbox is to > > > never > > > crash the kernel - and allowing BPF programs to just randomly modify the > > > return value of kernel fun

Re: [PATCH 1/2] bpf: add a bpf_override_function helper

2017-11-03 Thread Josef Bacik
On Fri, Nov 03, 2017 at 12:12:13AM +0100, Daniel Borkmann wrote: > Hi Josef, > > one more issue I just noticed, see comment below: > > On 11/02/2017 03:37 PM, Josef Bacik wrote: > [...] > > diff --git a/include/linux/filter.h b/include/linux/filter.h > > index cdd

[PATCH 1/2] bpf: add a bpf_override_function helper

2017-10-30 Thread Josef Bacik
From: Josef Bacik Error injection is sloppy and very ad-hoc. BPF could fill this niche perfectly with it's kprobe functionality. We could make sure errors are only triggered in specific call chains that we care about with very specific situations. Accomplish this wit

[PATCH 0/2] Add the ability to do BPF directed error injection

2017-10-30 Thread Josef Bacik
A lot of our error paths are not well tested because we have no good way of injecting errors generically. Some subystems (block, memory) have ways to inject errors, but they are random so it's hard to get reproduceable results. With BPF we can add determinism to our error injection. We can use k

[PATCH 2/2] samples/bpf: add a test for bpf_override_return

2017-10-30 Thread Josef Bacik
From: Josef Bacik This adds a basic test for bpf_override_return to verify it works. We override the main function for mounting a btrfs fs so it'll return -ENOMEM and then make sure that trying to mount a btrfs fs will fail. Signed-off-by: Josef Bacik --- samples/bpf/Mak

[PATCH 02/15] block: introduce bio_issue_as_root_blkg

2018-06-25 Thread Josef Bacik
From: Josef Bacik Instead of forcing all file systems to get the right context on their bio's, simply check for REQ_META to see if we need to issue as the root blkg. We don't want to force all bio's to have the root blkg associated with them if REQ_META is set, as some c

Re: ANNOUNCE: bpfd - a remote proxy daemon for executing bpf code (with corres. bcc changes)

2018-01-25 Thread Josef Bacik
On Wed, Jan 24, 2018 at 08:29:39PM -0800, Joel Fernandes wrote: > Hi Guys, > > Just providing an update: I made lots of progress last few weeks and > all the issues mentioned below (in the last post) are resolved. > I published an LWN article explaining the design of BPFd and BCC-side > changes: h

Re: [PATCH bpf-next v3 3/5] error-injection: Separate error-injection from kprobe

2018-01-10 Thread Josef Bacik
On Wed, Jan 10, 2018 at 07:18:05PM +0900, Masami Hiramatsu wrote: > Since error-injection framework is not limited to be used > by kprobes, nor bpf. Other kernel subsystems can use it > freely for checking safeness of error-injection, e.g. > livepatch, ftrace etc. > So this separate error-injection

Re: [PATCH bpf-next v3 4/5] error-injection: Add injectable error types

2018-01-10 Thread Josef Bacik
ern struct error_injection_entry __start_error_injection_whitelist[]; > +extern struct error_injection_entry __stop_error_injection_whitelist[]; > > static void __init populate_kernel_ei_list(void) > { > @@ -157,11 +171,26 @@ static void *ei_seq_next(struct seq_file *m, void *v, >

Re: [PATCH bpf-next v3 5/5] error-injection: Support fault injection framework

2018-01-10 Thread Josef Bacik
2 > > mount: mount /dev/loop2 on /opt/tmpmnt failed: Cannot allocate memory > SUCCESS! > === > > > Signed-off-by: Masami Hiramatsu Reviewed-by: Josef Bacik Thanks, Josef

Re: [PATCH bpf-next v4 3/5] error-injection: Separate error-injection from kprobe

2018-01-11 Thread Josef Bacik
ION_ERROR_INJECTION is the config item of this > feature. It is automatically enabled if the arch supports > error injection feature for kprobe or ftrace etc. > > Signed-off-by: Masami Hiramatsu Reviewed-by: Josef Bacik Thanks, Josef

Re: [PATCH bpf-next v3 1/5] tracing/kprobe: bpf: Check error injectable event is on function entry

2018-01-10 Thread Josef Bacik
sw-breakpoint based kprobe > events too. > > Signed-off-by: Masami Hiramatsu Reviewed-by: Josef Bacik Thanks, Josef

Re: [PATCH bpf-next v3 2/5] tracing/kprobe: bpf: Compare instruction pointer with original one

2018-01-10 Thread Josef Bacik
an be done > in one place. > > Signed-off-by: Masami Hiramatsu Reviewed-by: Josef Bacik Thanks, Josef

Re: [PATCH] uprobe: add support for overlayfs

2018-03-05 Thread Josef Bacik
essfully register. > > Running the example above with the patch applied, we can see that the > uprobe is enabled and will output to trace as expected. > > Signed-off-by: Howard McLauchlan Reviewed-by: Josef Bacik Thanks, Josef

Re: [PATCH] mm: Fix int overflow in callers of do_shrink_slab()

2018-09-28 Thread Josef Bacik
bjects returned by do_shrink_slab() > may be interpreted as SHRINK_EMPTY, if low bytes of > their value are equal to 0xfffe. Fix that > by declaration ret as unsigned long in these functions. > > Reported-by: Cyrill Gorcunov > Signed-off-by: Kirill Tkhai Reviewed-by: Josef Bacik Thanks, Josef

Re: [PATCH 4/4] mm: use the cached page for filemap_fault

2018-12-05 Thread Josef Bacik
On Tue, Dec 04, 2018 at 02:50:34PM -0800, Andrew Morton wrote: > On Fri, 30 Nov 2018 14:58:12 -0500 Josef Bacik wrote: > > > If we drop the mmap_sem we have to redo the vma lookup which requires > > redoing the fault handler. Chances are we will just come back to the > >

[PATCH 0/4][V4] drop the mmap_sem when doing IO in the fault path

2018-11-30 Thread Josef Bacik
v3->v4: - dropped the ->page_mkwrite portion of these patches, we don't actually see issues with mkwrite in production, and I kept running into corner cases where I missed something important. I want to wait on that part until I have a real reason to do the work so I can have a solid test in

[PATCH 3/4] filemap: drop the mmap_sem for all blocking operations

2018-11-30 Thread Josef Bacik
sem. Signed-off-by: Josef Bacik --- mm/filemap.c | 113 --- 1 file changed, 93 insertions(+), 20 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index f068712c2525..5e76b24b2a0f 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2304

[PATCH 1/4] mm: infrastructure for page fault page caching

2018-11-30 Thread Josef Bacik
've converted x86, other arch's can follow suit if they so wish, it's relatively straightforward. Signed-off-by: Josef Bacik --- arch/x86/mm/fault.c | 6 +++- include/linux/mm.h | 31 + mm/memory.c | 79

[PATCH 2/4] filemap: kill page_cache_read usage in filemap_fault

2018-11-30 Thread Josef Bacik
ag so that pagecache_get_page() will return a unlocked page that's in pagecache. Then use the normal page locking and readpage logic already in filemap_fault. This simplifies the no page in page cache case significantly. Signed-off-by: Josef Bacik --- include/linux/pagemap.h | 1

[PATCH 4/4] mm: use the cached page for filemap_fault

2018-11-30 Thread Josef Bacik
If we drop the mmap_sem we have to redo the vma lookup which requires redoing the fault handler. Chances are we will just come back to the same page, so save this page in our vmf->cached_page and reuse it in the next loop through the fault handler. Signed-off-by: Josef Bacik --- mm/filema

[PATCH 00/14][V4] Introduce io.latency io controller for cgroups

2018-06-27 Thread Josef Bacik
No functional changes, just fixing some panic's in configurations we weren't testing in production. v3->v4: - deal with a child having a configuration but the parent not. - fix use of setup_timer, there was an API change between the kernel I wrote/tested these patches on and the current kernel.

Re: [PATCH 00/10] RFC: assorted bcachefs patches

2018-05-18 Thread Josef Bacik
On Fri, May 18, 2018 at 03:48:58AM -0400, Kent Overstreet wrote: > These are all the remaining patches in my bcachefs tree that touch stuff > outside > fs/bcachefs. Not all of them are suitable for inclusion as is, I wanted to get > some discussion first. > > * pagecache add lock > > This is th

Re: [PATCH 00/10] RFC: assorted bcachefs patches

2018-05-18 Thread Josef Bacik
On Fri, May 18, 2018 at 01:49:12PM -0400, Kent Overstreet wrote: > On Fri, May 18, 2018 at 01:45:36PM -0400, Josef Bacik wrote: > > On Fri, May 18, 2018 at 03:48:58AM -0400, Kent Overstreet wrote: > > > These are all the remaining patches in my bcachefs tree that touch st

[PATCH][v6] filemap: drop the mmap_sem for all blocking operations

2018-12-12 Thread Josef Bacik
a page lock and still have a not uptodate page. This allows us to deal with this case by grabbing the lock and issuing the IO without the mmap_sem held, and then returning VM_FAULT_RETRY to come back around. Acked-by: Johannes Weiner Signed-off-by: Josef Bacik --- v5->v6: - added more comm

Re: [PATCH v2] block: fix iolat timestamp and restore accounting semantics

2018-12-13 Thread Josef Bacik
On Thu, Dec 13, 2018 at 12:48:11PM -0700, Jens Axboe wrote: > On 12/11/18 4:01 PM, Dennis Zhou wrote: > > The blk-iolatency controller measures the time from rq_qos_throttle() to > > rq_qos_done_bio() and attributes this time to the first bio that needs > > to create the request. This means if a bi

Re: [PATCH v2] block: fix iolat timestamp and restore accounting semantics

2018-12-13 Thread Josef Bacik
On Thu, Dec 13, 2018 at 12:59:03PM -0700, Jens Axboe wrote: > On 12/13/18 12:52 PM, Josef Bacik wrote: > > On Thu, Dec 13, 2018 at 12:48:11PM -0700, Jens Axboe wrote: > >> On 12/11/18 4:01 PM, Dennis Zhou wrote: > >>> The blk-iolatency controller measures the time f

Re: [PATCH] block: fix iolat timestamp and restore accounting semantics

2018-12-10 Thread Josef Bacik
ors by accounting time separately in a bio > adding the field bi_start. If this field is set, the bio should be > processed by blk-iolatency in rq_qos_done_bio(). > > [1] https://lore.kernel.org/lkml/20181205171039.73066-1-den...@kernel.org/ > > Signed-off-by: Dennis Zhou

Re: [PATCH 3/4] filemap: drop the mmap_sem for all blocking operations

2018-12-10 Thread Josef Bacik
On Fri, Dec 07, 2018 at 12:01:38PM +0100, Jan Kara wrote: > On Fri 30-11-18 14:58:11, Josef Bacik wrote: > > Currently we only drop the mmap_sem if there is contention on the page > > lock. The idea is that we issue readahead and then go to lock the page > > while it is un

Re: [PATCH 3/4] filemap: drop the mmap_sem for all blocking operations

2018-12-11 Thread Josef Bacik
On Tue, Dec 11, 2018 at 10:40:34AM +0100, Jan Kara wrote: > On Mon 10-12-18 13:44:39, Josef Bacik wrote: > > On Fri, Dec 07, 2018 at 12:01:38PM +0100, Jan Kara wrote: > > > On Fri 30-11-18 14:58:11, Josef Bacik wrote: > > > > @@ -2433,9 +2458,32 @@ vm_fault_t file

[PATCH 1/3] filemap: kill page_cache_read usage in filemap_fault

2018-12-11 Thread Josef Bacik
ag so that pagecache_get_page() will return a unlocked page that's in pagecache. Then use the normal page locking and readpage logic already in filemap_fault. This simplifies the no page in page cache case significantly. Acked-by: Johannes Weiner Reviewed-by: Jan Kara Signed-off-

[PATCH 3/3] filemap: drop the mmap_sem for all blocking operations

2018-12-11 Thread Josef Bacik
a page lock and still have a not uptodate page. This allows us to deal with this case by grabbing the lock and issuing the IO without the mmap_sem held, and then returning VM_FAULT_RETRY to come back around. Acked-by: Johannes Weiner Signed-off-by: Josef Ba

[PATCH 0/3][V5] drop the mmap_sem when doing IO in the fault path

2018-12-11 Thread Josef Bacik
Here's the latest version, slimmed down a bit from my last submission with more details in the changelogs as requested. v4->v5: - dropped the cached_page infrastructure and the addition of the handle_mm_fault_cacheable helper as it had no discernable bearing on performance in my performance te

[PATCH 2/3] filemap: pass vm_fault to the mmap ra helpers

2018-12-11 Thread Josef Bacik
All of the arguments to these functions come from the vmf, and the following patches are going to add more arguments. Cut down on the amount of arguments passed by simply passing in the vmf to these two helpers. Signed-off-by: Josef Bacik --- mm/filemap.c | 28 ++-- 1

Re: [PATCH 0/4] eventfs: Some more minor fixes

2023-11-22 Thread Josef Bacik
On Tue, Nov 21, 2023 at 06:10:03PM -0500, Steven Rostedt wrote: > Mark Rutland reported some crashes from the latest eventfs updates. > This fixes most of them. > > He still has one splat that he can trigger but I can not. Still looking > into that. Reviewed-by: Josef Bacik Thanks, Josef

Re: [PATCH] fix panic in jbd by adding locks

2007-08-21 Thread Josef Bacik
On Mon, Aug 20, 2007 at 05:20:21PM +0200, Jan Kara wrote: > OK, thanks. So record probably points to an already freed memory which has > been overwritten by garbage... > > > > Thanks for details. I'm still not convinced. What they essentially > > > write is that slab cache revoke_record_cache

Re: [PATCH] fix panic in jbd by adding locks

2007-08-21 Thread Josef Bacik
On Tue, Aug 21, 2007 at 06:48:15PM +0200, Jan Kara wrote: > On Tue 21-08-07 11:43:12, Josef Bacik wrote: > > On Mon, Aug 20, 2007 at 05:20:21PM +0200, Jan Kara wrote: > > > OK, thanks. So record probably points to an already freed memory which > > > has > &

Re: [PATCH] fix panic in jbd by adding locks

2007-08-23 Thread Josef Bacik
On Tue, Aug 21, 2007 at 01:45:02PM -0400, Josef Bacik wrote: > > > handle_t's are removed and such before processing the revoke lists, but > > > right > > > before we process the revoke lists we set the journals running > > > transaction to > > &

[PATCH] sched/fair: change where we report sched stats

2014-12-09 Thread Josef Bacik
ere. This is an important fix for us and anybody else who wants to do latency debugging in production at a large scale. Thanks Signed-off-by: Josef Bacik --- kernel/sched/core.c | 14 -- kernel/sched/fair.c | 14 ++ kernel/sched/sched.h | 1 + 3 files changed, 11 in

Re: [PATCH] sched/fair: change where we report sched stats

2014-12-10 Thread Josef Bacik
On 12/10/2014 01:23 AM, Mike Galbraith wrote: On Tue, 2014-12-09 at 13:21 -0500, Josef Bacik wrote: This patch moves stat stuff to after the schedule, right as we are waking up, But sleep/block ends when the task is awakened/enqueued, not when it gets the CPU. You're adding sched

[PATCH 0/8] Sync and VFS scalability improvements V2

2015-03-20 Thread Josef Bacik
Here is the update to the patches based on comments from Al and Jan. The changes since V1 are - Dropped the IOP_NOTHASHED patch and replaced it wit the hlist_fake patch as per Al's suggestion. - Dropped "inode: convert per-sb inode list to a list_lru" since Jan has found some issues with it a

[PATCH 5/8] inode: rename i_wb_list to i_io_list

2015-03-20 Thread Josef Bacik
e can add a new "writeback list" in a subsequent patch. Signed-off-by: Dave Chinner Signed-off-by: Josef Bacik Reviewed-by: Jan Kara --- fs/fs-writeback.c | 20 ++-- fs/inode.c | 6 +++--- include/linux/fs.h | 2 +- mm/backing-dev.c | 8 4 files ch

[PATCH 6/8] bdi: add a new writeback list for sync

2015-03-20 Thread Josef Bacik
hould have very little work to do. This also means that we have to remove the inodes from the writeback list during eviction. Do this in inode_wait_for_writeback() once all writeback on the inode is complete. Signed-off-by: Dave Chinner Signed-off-by: Josef Bacik --- fs/

[PATCH 7/8] writeback: periodically trim the writeback list

2015-03-20 Thread Josef Bacik
. Signed-off-by: Dave Chinner Signed-off-by: Josef Bacik Reviewed-by: Jan Kara --- fs/fs-writeback.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 82b0f43..aa0de0f 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -1037,6

[PATCH 3/8] inode: convert inode_sb_list_lock to per-sb

2015-03-20 Thread Josef Bacik
id of contention as the locks still have global CPU scope, but it does isolate operations on different superblocks form each other. Signed-off-by: Dave Chinner Signed-off-by: Josef Bacik Reviewed-by: Jan Kara --- fs/block_dev.c | 12 ++-- fs/drop_caches.c

[PATCH 8/8] inode: don't softlockup when evicting inodes

2015-03-20 Thread Josef Bacik
~100 million inodes. This makes one processor a very unhappy person, so add a cond_resched() in dispose_list() and cond_resched_lock() in the eviction isolation function to combat this. Thanks, Signed-off-by: Josef Bacik --- fs/inode.c | 10 ++ 1 file changed, 10 insertions(+) diff

  1   2   3   4   5   6   >