RE: Linux NFS and cached properties

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

 



Hi Bruce,

Thanks for the clarification.

(I'm repeating a lot of my original mail because of the Cc: list.)

> J. Bruce Fields
> I think that's right, though I'm curious how you're managing to hit
> that case reliably every time.  Or is this an intermittent failure?
It's an intermittent failure, but with the procedure shown below it is
fairly easy to reproduce.    The actual problem we see in our product
is because of the way external storage media are handled in user-land.

        192.168.1.10# mount -t xfs /dev/sdcr/sda1 /mnt
        192.168.1.10# exportfs 192.168.1.11:/mnt

        192.168.1.11# mount 192.168.1.10:/mnt /mnt
        192.168.1.11# umount /mnt

        192.168.1.10# exportfs -u 192.168.1.11:/mnt
        192.168.1.10# umount /mnt
        umount: can't umount /media/recdisk: Device or resource busy

What I actually do is the mount/unmount on the client via ssh.  That
is a good way to trigger the problem.

We see that during the un-export the NFS caches are not flushed
properly which is why the final unmount fails.

In net/sunrpc/cache.c the cache times (last_refresh, expiry_time,
flush_time) are measured in seconds.  If I understand the code somewhat
then during an NFS un-export the is done by setting the flush_time to
the current time.  The cache_flush() is called.  If in that same second
last_refresh is set to the current time then the cached item is not
flushed.  This will subsequently cause un-mount to fail because there
is still a reference to the mount point.

> J. Bruce Fields
> I ran across that recently while reviewing the code to fix a related
> problem.  I'm not sure what the best fix would be.
>
> Previously raised here:
>
>       http://marc.info/?l=linux-nfs&m=133514319408283&w=2

The description in your mail does indeed looks the same as the problem
that we see.

>From reading the code in net/sunrpc/cache.c I get the impression that it is
not really possible to reliably flush the caches for an un-exportfs such
that after flushing they will not accept entries for the un-exported IP/mount
point combination.

With kind regards,
Hans Zuidam


________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

--
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