lkml.org 
[lkml]   [2009]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] nfs: fix bdi_unregister() before sb kill
From
Date
On Thu, 2009-09-17 at 21:40 +0200, Jens Axboe wrote:
> On Thu, Sep 17 2009, Jens Axboe wrote:
> > Hi,
> >
> > This can cause a hang on NFS umount, since the bdi gets pruned before we
> > flush any pending dirty IO. Peter, can you check whether it fixes your
> > issue?
>
> There's another problem with NFS && backing devices. NFS may call
> bdi_destroy() on a bdi without ever called bdi_init(). This was always a
> bad idea, now it's an issue.
>
> So, Trond, can I safely add a server->flags private flag to indicate
> that we have called bdi_init()? Then nfs_free_server() knows when to
> call bdi_destroy(). Seems like the safest fix, since error handling is
> currently 'just call nfs_free_server()'.

Urgh... Is there any reason why we can't just move the call to
bdi_init() into nfs_bdi_register()? It seems bizarre to have to
initialise the backing_dev_info twice like this...

If we do that, then we can just look at the BDI_registered state flag in
order to figure out if we need to call bdi_unregister()

Cheers
Trond



\
 
 \ /
  Last update: 2009-09-18 01:19    [W:1.239 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site