Problem with deferred close after umount

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

 



Hi Steve/Ronnie,

I'm seeing a strange problem with deferred close.
This is the test that I'm running:
1. mount a share with actime=600
2. open a file in the share so that a handle is opened, and it gets
scheduled for deferred close.
3. umount the share. That works.
4. rmmod cifs does not seem to work. It says module cifs is in use.
DebugData shows that tcon/ses/connections are all active for the
unmounted share.

I think I understand why this happens, but need help understanding how
to fix this.

Each handle open takes a reference on tcon, and also on the
superblock. So even when the mount point is umounted, tcon does not
get freed. I see that it gets freed when all handles that are deferred
for close are actually closed.

I tried calling cifs_close_all_deferred_files for the tcon in
cifs_umount_begin. I even tried printing a log there. I did not see
that getting logged during umount. Does that mean umount_begin is not
getting called?

Wondering what is the correct way to fix this? Ideally, we should call
cifs_close_all_deferred_files as soon as the share is umounted. Which
is the first callback in cifs.ko for this. I was assuming that
umount_begin is that callback. But my experiments are not seeing that
getting called.

-- 
Regards,
Shyam



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux