Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1492063

Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super() and thaw_super() paths

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super() and thaw_super() paths
Date 2016-09-27 19:30 +0200
Message-ID <sm4mB-3UT-11@gated-at.bofh.it> (permalink)
References <slGDE-5XZ-7@gated-at.bofh.it> <slGDE-5XZ-5@gated-at.bofh.it> <slGNk-64r-13@gated-at.bofh.it> <slHq2-6hN-39@gated-at.bofh.it> <slUwV-6dY-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/27, Jan Kara wrote:
>
> On Mon 26-09-16 18:55:25, Oleg Nesterov wrote:
> >
> > Heh ;) if only I knew how to test this... I ran the following script
> > under qemu
> >
> > 	mkfs.xfs -f /dev/vda
> > 	mkfs.xfs -f /dev/vdb
> >
> > 	mkdir -p TEST SCRATCH
> >
> > 	TEST_DEV=/dev/vda TEST_DIR=TEST SCRATCH_DEV=/dev/vdb SCRATCH_MNT=SCRATCH \
> > 	./check `grep -il freeze tests/*/???`
>
> You can run either:
>
> 	./check -g freeze

passed all 6 tests.

> to check just the freezing tests or
>
> 	./check
>
> to run all sensible tests which is what I'd do (but it will take couple of
> hours to pass). If that passes, chances are good there are no easy false
> positives.

It seems that generic/001 just hangs on my laptop. With or without this change.
Or perhaps I didn't wait enough... Or perhaps something is wrong with my very
limited testing environment. I'll reserve a testing machine tomorrow.

> > And yes, I'm afraid this change can uncover some false positives later.
> > But at the same time potentially it can find the real problems.
>
> Well, sure it's not an end of world if there is some false positive - we
> can just revert the change - but lockdep false positives are always
> annoying because they take time to analyze and until they are fixed, you
> are unable to see other probles found by lockdep...

Yes, yes, agreed.

> > It would be nice to remove another hack in __sb_start_write under
> > ifdef(CONFIG_LOCKDEP), but iirc XFS actually takes the same rw_sem twice
> > for reading, so we can't do this.
>
> Yes, and I don't really consider this a hack.

Ah, sorry, I didn't try to blame XFS/fs. I meant, this "force_trylock" hack
doesn't look nice. Perhaps we can use rwsem_acquire_nest() instead.

> Reviewed-by: Jan Kara <jack@suse.cz>

Thanks!

Oleg.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] (Was: BUG_ON in rcu_sync_func triggered) Oleg Nesterov <oleg@redhat.com> - 2016-09-26 18:10 +0200
  [PATCH 2/2] fs/super.c: don't fool lockdep in freeze_super() and  thaw_super() paths Oleg Nesterov <oleg@redhat.com> - 2016-09-26 18:10 +0200
    Re: [PATCH 2/2] fs/super.c: don't fool lockdep in freeze_super() and  thaw_super() paths Jan Kara <jack@suse.cz> - 2016-09-26 18:20 +0200
      [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super() and  thaw_super() paths Oleg Nesterov <oleg@redhat.com> - 2016-09-26 19:00 +0200
        Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Jan Kara <jack@suse.cz> - 2016-09-27 09:00 +0200
          Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Dave Chinner <david@fromorbit.com> - 2016-09-27 09:20 +0200
          Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Oleg Nesterov <oleg@redhat.com> - 2016-09-27 19:30 +0200
            Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Oleg Nesterov <oleg@redhat.com> - 2016-09-30 19:20 +0200
              Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Dave Chinner <david@fromorbit.com> - 2016-10-02 23:50 +0200
                Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in         freeze_super() and thaw_super() paths Oleg Nesterov <oleg@redhat.com> - 2016-10-03 18:50 +0200
                Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Oleg Nesterov <oleg@redhat.com> - 2016-10-04 19:00 +0200
                Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Dave Chinner <david@fromorbit.com> - 2016-10-04 22:10 +0200
                Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Oleg Nesterov <oleg@redhat.com> - 2016-10-05 18:40 +0200
                Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Dave Chinner <david@fromorbit.com> - 2016-10-04 21:50 +0200
                Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Oleg Nesterov <oleg@redhat.com> - 2016-10-05 18:50 +0200
                Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Jan Kara <jack@suse.cz> - 2016-10-06 09:30 +0200
                Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Oleg Nesterov <oleg@redhat.com> - 2016-10-06 19:20 +0200
                Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Dave Chinner <david@fromorbit.com> - 2016-10-07 00:00 +0200
                Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Oleg Nesterov <oleg@redhat.com> - 2016-10-07 19:20 +0200
                Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Dave Chinner <david@fromorbit.com> - 2016-10-08 01:00 +0200
                Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in         freeze_super() and thaw_super() paths Oleg Nesterov <oleg@redhat.com> - 2016-10-09 18:20 +0200
                Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Dave Chinner <david@fromorbit.com> - 2016-10-10 03:20 +0200
                Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in freeze_super()  and thaw_super() paths Johannes Weiner <hannes@cmpxchg.org> - 2016-10-06 15:50 +0200
                Re: [PATCH V2 2/2] fs/super.c: don't fool lockdep in         freeze_super() and thaw_super() paths Oleg Nesterov <oleg@redhat.com> - 2016-10-07 19:00 +0200
  [PATCH 1/2] fs/super.c: fix race between freeze_super() and  thaw_super() Oleg Nesterov <oleg@redhat.com> - 2016-09-26 18:10 +0200
    Re: [PATCH 1/2] fs/super.c: fix race between freeze_super() and  thaw_super() Jan Kara <jack@suse.cz> - 2016-09-26 18:20 +0200

csiph-web