Why l1_idFileSystem is answered by st.st_ex_dev?

Jeremy Allison jra at samba.org
Wed Oct 26 19:42:15 UTC 2016


On Wed, Oct 26, 2016 at 12:22:22PM +0000, withlog at yahoo.com wrote:
>  
>  Hi, everybody:
>        I read the function smbd_do_qfsinfo.  I found that in case SMB_INFO_ALLOCATION, there is following  sentence:
>       SIVAL(pdata,l1_idFileSystem,st.st_ex_dev);
>       My question is why use  st.st_ex_dev ?  Actually, according to [MS-CIFS], it is the id of file system. If we call the function statfs, we will get the  struct statfs *buf.  In this struct, there is a "fsid_t f_fsid;". Why not use this  f_fsid?

Well the id of the file system can mean
many things. Whist the server is up, the
device number serves to uniquely identify
the file system, so I don't see a problem
with st.st_ex_dev here.

Only if this number needs to be preserved
across client sessions would the file system
id on disk be useful (and do all UNIXes have
such a concept ?).



More information about the samba-technical mailing list