[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] 3.12 BUG() on ext4, kernel crash on nbd-client when nbd server rebooting

On Fri, Nov 15, 2013 at 2:50 AM, Wouter Verhelst <w@...112...> wrote:

I'm not sure if this has been implemented that way (that's Paul's area,
not mine), but the intention was that the nbd kernel module would only
do cleanup once the nbd-client process exits.

Not quite. It cleans up at the end of NBD_DO_IT ioctl, before returning to userland to do the reconnect.
That is, if nbd-client has
not yet exited, that could be because it's in -persist mode and is
trying to reconnect.

The -persist mode will only work if there is no ongoing I/O. With I/O you're likely to get a kernel panic in the filesystem.

In order for nbd to seamlessly handle this situation, we'd have to do a reconnect in-kernel (or have a callout to userland to reconnect) and then we'd have to retry any I/Os that may have failed in the meantime (or just let them fail, but that probably is not as useful).

The solution that Jack mentions is worth looking into -- it should at least avoid the filesystem panics that we now have. I'll take a look...


Reply to: