Paulo Alcantara <pc@xxxxxxxxxxxxx> writes: > +static int create_nfs_reparse(const unsigned int xid, > + struct cifs_tcon *tcon, > + struct cifs_sb_info *cifs_sb, > + const char *full_path, mode_t mode, > + struct reparse_posix_data *buf) > +{ > + u64 type; > + u16 len, dlen; > + > + len = sizeof(*buf); > + > + switch ((type = mode_nfs_type(mode))) { > + case NFS_SPECFILE_BLK: > + case NFS_SPECFILE_CHR: > + dlen = sizeof(__le64); > + break; > + case NFS_SPECFILE_FIFO: > + case NFS_SPECFILE_SOCK: > + dlen = 0; > + break; > + default: > + return -EOPNOTSUPP; > + } > + > + buf->ReparseTag = cpu_to_le32(IO_REPARSE_TAG_NFS); > + buf->InodeType = cpu_to_le64(type); > + buf->ReparseDataLength = cpu_to_le16(len + dlen - > + sizeof(struct reparse_data_buffer)); Err, forgot having @buf->Reserved set to 0 here, sorry. MS-FSCC doesnt't say we _must_ to, however it's better not sending garbage over the wire. Let me know if you'd need v2 for the above.