#53 fuser -m option regression on block device

Next Release
closed
nobody
None
5
2014-12-03
2012-08-18
Anonymous
No

As the man page saied, we can use the -m option of fuser with a block device which has been mounted at some point. And fuser should report processes which visiting that filesystem. But now it feature looks like broken:

$ ./src/fuser -m /boot
<nothing>
$ ./src/fuser -m /dev/sda2
/dev/sda2: 1026 1038 3118 3132 3133 3156 3159 3167 3259 3264 3266 3286 3292m 3299 3309 3318 3354 3522 3534 3923 3926 3944 4739 6242 8853 11539 17165 17275 18572 18851 18873 20623 22671 23751 25485 28575 28602 32041 32711
$ df /dev/sda2
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 253431 151993 88638 64% /boot

And the outputs of 'fuser -m /dev/sda2' is same to 'fuser -m /dev'.

Discussion

  • hpt

    hpt - 2012-08-18

    Maybe this patch can fix this problem, I think.

    diff --git a/src/fuser.c b/src/fuser.c
    index e29a345..653d00e 100644
    --- a/src/fuser.c
    +++ b/src/fuser.c
    @@ -449,14 +449,6 @@ int parse_file(struct names this_name, struct inode_list *ino_list, const char
    free(this_name->filename);
    this_name->filename = strdup(new);
    }
    -#ifdef _LISTS_H
    - if (opts & OPT_MOUNTS) {
    - this_name->st.st_dev = device(this_name->filename);
    - this_name->st.st_ino = 0;
    - add_inode(ino_list, this_name, this_name->st.st_dev, this_name->st.st_ino);
    - return 0;
    - }
    -#endif

        if (timeout(stat, this_name->filename, &(this_name->st), 5) != 0) {
       if (errno == ENOENT)
    

    --

     
  • Craig Small

    Craig Small - 2012-08-30

    Just to be clear, I think your /boot output is correct and your /dev/sda2 output is incorrect. I get the same thing here and I'm pretty sure thers not 20 processes looking at files in /boot

     
  • Craig Small

    Craig Small - 2012-08-30

    Thanks for the info hanpt, I first looked at it and thought you cut out too much but I cannot find and test samples that break with that change, so it is in.

     
  • Anonymous - 2012-11-20

    I get also this problem. When using -m option on a block device, fuser reports the processes that use /dev mount point instead of the processes that use the block device, as it worked in 21.5 release. Will it be fixed soon ?

    Regards

     
  • Anonymous - 2012-11-20

    Sorry about the previous comment, this is fixed in the 22.20 release.

     
  • Craig Small

    Craig Small - 2014-01-31
    • status: pending --> closed
    • Group: --> Next Release
     
  • Greg

    Greg - 2014-12-02

    This is broken again in 22.21 in opensuse 13.2 (released Nov 2014).

    Can this bug be re-opened? Or do I need to file a new one?

     
  • Dr. Werner Fink

    Dr. Werner Fink - 2014-12-03

    Thanks, I can see boo#908068 ...

     
    • Craig Small

      Craig Small - 2014-12-03

      On Wed, Dec 03, 2014 at 08:43:10AM +0000, Dr. Werner Fink wrote:

      Thanks, I can see boo#908068 ...
      Not sure what BTS that references.

      I'm not seeing this in either Debian or the plain upstream versions
      of fuser. Werner, would commit 3638cc5 be the reason why this is not
      appearing anymore?

      And the outputs of 'fuser -m /dev/sda2' is same to 'fuser -m /dev'.
      Not seeing that either; is this a SuSE specific thing?
      It could be just the disks layout I have don't show this problem.

      - Craig

      Craig Small (@smallsees) http://enc.com.au/ csmall at : enc.com.au
      Debian GNU/Linux http://www.debian.org/ csmall at : debian.org
      GPG fingerprint: 5D2F B320 B825 D939 04D2 0519 3938 F96B DF50 FEA5

       
      • Dr. Werner Fink

        Dr. Werner Fink - 2014-12-03

        On Wed, Dec 03, 2014 at 11:54:21AM +0000, Craig Small wrote:

        On Wed, Dec 03, 2014 at 08:43:10AM +0000, Dr. Werner Fink wrote:

        Thanks, I can see boo#908068 ...
        Not sure what BTS that references.

        I'm not seeing this in either Debian or the plain upstream versions
        of fuser. Werner, would commit 3638cc5 be the reason why this is not
        appearing anymore?

        Hmmm ... this one I'd already added. The only patch which I do not have
        submitted is the attached one.

        --
        "Having a smoking section in a restaurant is like having
        a peeing section in a swimming pool." -- Edward Burr

         


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks