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-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html