Re: [PATCH 03/11] Add support for per-file/inode stream ID

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

 



On 03/04/2016 11:53 AM, Shaun Tancheff wrote:
What do you think of falling back to i_ino for applications which don't
make use of setting stream_id yet?

Something like this (or using a crc16 instead of the xor hack)?

static inline unsigned int inode_streamid(struct inode *inode)
{
if (inode) {
if (inode->i_streamid)
return inode->i_streamid;
return ((inode->i_ino >> 16) ^ inode->i_ino) & 0xFFFF;
}
return 0;
}

If the device supports a high enough number of concurrently open streams, that might work fine. But if the mask ends up being 0x7, then I think it'll just introduce randomness into the whole thing.

But it's something that could be experimented with, certainly.

--
Jens Axboe

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



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux