bug-gnulib
[Top][All Lists]
Advanced

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

Re: fts vs. simulated-inode file systems: FUSE-based, FAT, smbfs, cifs,


From: Miklos Szeredi
Subject: Re: fts vs. simulated-inode file systems: FUSE-based, FAT, smbfs, cifs, ...
Date: Fri, 13 Oct 2006 13:26:20 +0200

Hi,

I've tried out the CVS version of findutils+gnulib, and it does indeed
seem to fix the problem with inode-less filesystems, in addition to
using noticably less system time.

I've also found that the -xdev option of find no longer works: it
outputs just a single line for the base directory.

Looking at the strace, there's still a possibility for an optimization
on systems which have both O_DIRECTORY and O_NOFOLLOW.

This:

  lstat64("foo", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
  open("foo", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 5
  fstat64(5, {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0

Could be replaced with this:

  open("foo", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_NOFOLLOW) = 5
  fstat64(5, {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0

since the lstat becomes unnecessary, once the open is sure to fail on
anything non-directory.

Miklos




reply via email to

[Prev in Thread] Current Thread [Next in Thread]