Re: [PATCH v4 09/11] nfsdcld: reopen pipe if it's deleted and recreated

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

 



On Thu, 26 Jan 2012 13:58:59 -0500
"J. Bruce Fields" <bfields@xxxxxxxxxxxx> wrote:

> On Thu, Jan 26, 2012 at 10:41:57AM -0500, Jeff Layton wrote:
> > Correct. When knfsd starts back up, a new pipe will be created. At that
> > point, the daemon will try to open the new one and will then close the
> > old if the open succeeds. It will only loop here if that open fails for
> > some reason.
> 
> I'm a little confused--how could this happen?
> 

Bugs?

> If it's because of something like knfsd stopping and restarting again
> (and the pipe diseappearing and reappering), then we should get another
> inotify event, and can handle the problem then.
> 

That's exactly what happens already. When the pipe is recreated, we get
an inotify event, and then attempt to reopen the pipe. I have that
attempt inside of a while loop so that if it fails, we'll reattempt
until it works.

It's highly unlikely that that would fail if the original open worked,
but it's best to account for the possibility and attempt to handle it
gracefully.

-- 
Jeff Layton <jlayton@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux