Re: [PATCH] lscp: support opening mounted filesystem by directory pathname

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

 



Hi,
On Wed, 2 Mar 2011 11:13:32 +0100, dexen deVries wrote:
> The patch I've submited may be a wrong solution; perhaps instead the algorithm 
> of nilfs_find_fs() (around lib/nilfs.c:179,211) should be improved.
> 
> Regards,

Well, allowing directory pathname for nilfs commands seems a good idea
to me.  Why not apply it to other commands except nilfs_cleanerd ?

I think you can simply the callsite of nilfs_open() just like follows:

  char *dev = NULL, *dir = NULL;

  ...
  stat(pathname, &statbuf);
  if (S_ISDIR(statbuf.st_mode))
        dir = pathname;
  else
        dev = pathname;

  nilfs = nilfs_open(dev, dir, NILFS_OPEN_RDONLY);
  ...


Thanks,
Ryusuke Konishi

> -- 
> dexen deVries
> 
> [[[↓][→]]]
> 
> > how does a C compiler get to be that big? what is all that code doing?
> 
> iterators, string objects, and a full set of C macros that ensure
> boundary conditions and improve interfaces.
> 
> ron minnich, in response to Charles Forsyth
> 
> http://9fans.net/archive/2011/02/90
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" 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 BTRFS]     [Linux CIFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux