Add system call for setting inode/file write stream ID
Single system call:
ssize_t streamid(int fd, int cmd, unsigned int flags, int streamid);
where 'fd' is a file descriptor to the file that we want to set the
write stream ID on. 'cmd' is one of the following:
STREAMID_OPEN Open/allocate a new stream ID
STREAMID_CLOSE Close/free a previously allocated stream ID
STREAMID_GET Return the currently assigned stream ID
'flags' is a mask of one or more of the following:
STREAMID_F_INODE Set stream ID on the inode
STREAMID_F_FILE Set stream ID on the file
'streamid' is either 0, which means that streamid() will return the
first available stream ID, or it's set to some integer value between 1
and STREAMID_MAX (both inclusive) to ask for a specific stream ID value.
streamid() returns the allocated stream ID on succes, or -1 and sets
errno appropriately. Possible error values:
-EINVAL cmd/flags isn't valid
-ESPIPE 'fd' refers to a pipe
-EBADF 'fd' isn't valid
-EBUSY 'streamid' is already allocated/assigned
Signed-off-by: Jens Axboe <axboe@fb.com>