Commit 3244f3a6 authored by Kirill Smelkov's avatar Kirill Smelkov

X wcfs: lsof +D misbehaves - don't use it

For example even with live wcfs lsof +D output differes from regular lsof and is misleading:

    LSOF /dev/shm/wcfs/b53b61099c740b452b383db6df6dce4ad6d23ba2:

    COMMAND     PID       USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
    runUnitTe 29137 slapuser34   24r   REG   0,48      111    4 /dev/shm/wcfs/b53b61099c740b452b383db6df6dce4ad6d23ba2/.wcfs/zurl
    runUnitTe 29137 slapuser34   25u   REG   0,48        0    7 /dev/shm/wcfs/b53b61099c740b452b383db6df6dce4ad6d23ba2/head/watch
    runUnitTe 29137 slapuser34   26r   REG   0,48  2097152    9 /dev/shm/wcfs/b53b61099c740b452b383db6df6dce4ad6d23ba2/head/bigfile/00000000000077e2

    LSOF +D /dev/shm/wcfs/b53b61099c740b452b383db6df6dce4ad6d23ba2:

    COMMAND     PID       USER   FD   TYPE DEVICE SIZE/OFF       NODE NAME
    runUnitTe 29137 slapuser34   24r   REG   0,48      111 4294967295 /dev/shm/wcfs/b53b61099c740b452b383db6df6dce4ad6d23ba2/.wcfs/zurl
    runUnitTe 29137 slapuser34   25u   REG   0,48        0 4294967295 /dev/shm/wcfs/b53b61099c740b452b383db6df6dce4ad6d23ba2/.wcfs/zurl
    runUnitTe 29137 slapuser34   26r   REG   0,48  2097152 4294967295 /dev/shm/wcfs/b53b61099c740b452b383db6df6dce4ad6d23ba2/.wcfs/zurl
parent 153c002a
...@@ -531,7 +531,8 @@ def _fuse_unmount(mntpt): ...@@ -531,7 +531,8 @@ def _fuse_unmount(mntpt):
# if there are other uncleaned wcfs mountpoints. # if there are other uncleaned wcfs mountpoints.
# (lsof stats all filesystems on startup) # (lsof stats all filesystems on startup)
# XXX -> better use `fuser -m <mntpt>` (it says it will limit search to files only under mntpt) ? # XXX -> better use `fuser -m <mntpt>` (it says it will limit search to files only under mntpt) ?
ret, out = _sysproccallout(["lsof", "-w", "+D", mntpt]) # NOTE lsof +D misbehves - don't use it
ret, out = _sysproccallout(["lsof", "-w", mntpt])
log.warn(out) log.warn(out)
if ret: if ret:
log.warn("(lsof failed)") log.warn("(lsof failed)")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment