Re: [PATCH] UBIFS: fill f_fsid

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

 



On Mon, 2008-09-01 at 14:16 +0300, Artem Bityutskiy wrote:
> On Mon, 2008-09-01 at 10:43 +0100, David Woodhouse wrote:
> > > UBIFS stores 16-bit UUID in the superblock, and it is a good
> > > idea to return part of it in 'f_fsid' filed of kstatfs structure.
> > 
> > I think you mean a 16-byte UUID, not 16-bit?
> 
> Oh, right.
> 
> > 
> > > +	memcpy(&buf->f_fsid, c->uuid, sizeof(__kernel_fsid_t));
> > 
> > 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?
> 
> Well, xor-ing should not make the random UUID more random, but for
> consistency purposes sure, I may use xor as well.
> 
> > Alternatively, there's space in the struct statfs to export a couple
> > more uint32_ts, and thus the _whole_ of the uuid. Perhaps we should do
> > that?
> 
> You mean f_spare? I do not think any application would use it so I doubt
> it is good idea to use it.

Well, it wouldn't be called f_spare any more, and applications would
know that it contains the rest of the UUID if it's non-zero.

I'd fix nfsd to fix it immediately (like as I just fixed nfsd to use the
first 64 bits of f_fsid when it's non-zero).

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@xxxxxxxxx                              Intel Corporation



--
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