Re: [PATCH] UBIFS: fill f_fsid

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

 



On Sep 02, 2008  10:03 +0300, Artem Bityutskiy wrote:
> On Mon, 2008-09-01 at 11:01 -0400, Christoph Hellwig wrote:
> > > For btrfs I xor the first 64 bits with the second 64 bits, and put
> > > _that_ into f_fsid. You're just putting the first 64 bits in and
> > > ignoring the second 64 bits. Neither is really _better_ than the other;
> > > you just alter the circumstances in which you get collisions. But I
> > > suppose we might as well be consistent about how we do it?
> > 
> > XFS just puts in the st_dev.  And I can't realy find any useful
> > defintion of what it's supposed to b anyway..
> 
> For me this means that we should rather do what XFS does for
> consistency then.

The fsid is supposed to be a persistent, unique identifier for the
filesystem, used by NFS in file handles.  Using st_dev is unsafe,
because that may change from one server boot to the next, because
of device probing order, driver changes, etc.  Also, not all filesystems
HAVE a valid st_dev in the first place, which is the whole reason
for this thread.

I think a ->get_fsid() export method would be preferable.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux