Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-21 Thread Jaegeuk Kim
On 09/21, Theodore Ts'o wrote: > On Wed, Sep 20, 2017 at 10:02:37PM -0700, Jaegeuk Kim wrote: > > > > Yes, and actually, android retries umount(2) for several seconds, if it gets > > failure. So, first I thought it'd be better to make umount() more > > deterministic. > > > > I'm not sure how

Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-21 Thread Jaegeuk Kim
On 09/21, Theodore Ts'o wrote: > On Wed, Sep 20, 2017 at 10:02:37PM -0700, Jaegeuk Kim wrote: > > > > Yes, and actually, android retries umount(2) for several seconds, if it gets > > failure. So, first I thought it'd be better to make umount() more > > deterministic. > > > > I'm not sure how

Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-21 Thread Theodore Ts'o
On Wed, Sep 20, 2017 at 10:02:37PM -0700, Jaegeuk Kim wrote: > > Yes, and actually, android retries umount(2) for several seconds, if it gets > failure. So, first I thought it'd be better to make umount() more > deterministic. > > I'm not sure how many times we can retry and wait for this.

Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-21 Thread Theodore Ts'o
On Wed, Sep 20, 2017 at 10:02:37PM -0700, Jaegeuk Kim wrote: > > Yes, and actually, android retries umount(2) for several seconds, if it gets > failure. So, first I thought it'd be better to make umount() more > deterministic. > > I'm not sure how many times we can retry and wait for this.

Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-20 Thread Jaegeuk Kim
On 09/21, Al Viro wrote: > On Wed, Sep 20, 2017 at 05:34:09PM -0700, Jaegeuk Kim wrote: > > > flush_delayed_fput() > > > does nothing, the list is empty > > > > how about waiting for workqueue completion here? > > > > > > > > > If all the __fput()s are not

Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-20 Thread Jaegeuk Kim
On 09/21, Al Viro wrote: > On Wed, Sep 20, 2017 at 05:34:09PM -0700, Jaegeuk Kim wrote: > > > flush_delayed_fput() > > > does nothing, the list is empty > > > > how about waiting for workqueue completion here? > > > > > > > > > If all the __fput()s are not

Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-20 Thread Al Viro
On Wed, Sep 20, 2017 at 05:34:09PM -0700, Jaegeuk Kim wrote: > > flush_delayed_fput() > > does nothing, the list is empty > > how about waiting for workqueue completion here? > > > > > If all the __fput()s are not finished, do_umount() will return

Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-20 Thread Al Viro
On Wed, Sep 20, 2017 at 05:34:09PM -0700, Jaegeuk Kim wrote: > > flush_delayed_fput() > > does nothing, the list is empty > > how about waiting for workqueue completion here? > > > > > If all the __fput()s are not finished, do_umount() will return

Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-20 Thread Jaegeuk Kim
On 09/20, Al Viro wrote: > On Wed, Sep 20, 2017 at 10:38:31AM -0700, Jaegeuk Kim wrote: > > This patch introduces UMOUNT_WAIT flag for umount(2) which let user wait for > > umount(2) to complete filesystem shutdown. This should fix a kernel panic > > triggered when a living filesystem tries to

Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-20 Thread Jaegeuk Kim
On 09/20, Al Viro wrote: > On Wed, Sep 20, 2017 at 10:38:31AM -0700, Jaegeuk Kim wrote: > > This patch introduces UMOUNT_WAIT flag for umount(2) which let user wait for > > umount(2) to complete filesystem shutdown. This should fix a kernel panic > > triggered when a living filesystem tries to

Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-20 Thread Al Viro
On Wed, Sep 20, 2017 at 10:38:31AM -0700, Jaegeuk Kim wrote: > This patch introduces UMOUNT_WAIT flag for umount(2) which let user wait for > umount(2) to complete filesystem shutdown. This should fix a kernel panic > triggered when a living filesystem tries to access dead block device after >

Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-20 Thread Al Viro
On Wed, Sep 20, 2017 at 10:38:31AM -0700, Jaegeuk Kim wrote: > This patch introduces UMOUNT_WAIT flag for umount(2) which let user wait for > umount(2) to complete filesystem shutdown. This should fix a kernel panic > triggered when a living filesystem tries to access dead block device after >

Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-20 Thread Jaegeuk Kim
This patch introduces UMOUNT_WAIT flag for umount(2) which let user wait for umount(2) to complete filesystem shutdown. This should fix a kernel panic triggered when a living filesystem tries to access dead block device after device_shutdown done by kernel_restart as below. Term:

Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-20 Thread Jaegeuk Kim
This patch introduces UMOUNT_WAIT flag for umount(2) which let user wait for umount(2) to complete filesystem shutdown. This should fix a kernel panic triggered when a living filesystem tries to access dead block device after device_shutdown done by kernel_restart as below. Term: