>It would be possible to introduce a new getdents() call that produces
>a different format. Older applications would use the old getdents() call.

The getdents() call returns a structure which looks like:

typedef struct dirent {
        ino_t           d_ino;          /* "inode number" of entry */
        off_t           d_off;          /* offset of disk directory entry */
        unsigned short  d_reclen;       /* length of this record */
        char            d_name[1];      /* name of file */
} dirent_t;

It's easy to store the little bit of additional information by
bumping d_reclen and adding it add the end.

This would not be noticable as the name is NUL terminated and we
control all the getdents return paths in the kernel.

For the readdir() call it gets trickier but still not impossible.

Casper

Reply via email to