s3: Fix streams enumeration bug in OneFS implementation
authorAravind Srinivasan <aravind.srinivasan@isilon.com>
Thu, 19 Feb 2009 01:36:25 +0000 (17:36 -0800)
committerSteven Danneman <steven.danneman@isilon.com>
Thu, 19 Feb 2009 04:49:31 +0000 (20:49 -0800)
commit8e8aa27e1b1366c8c4e3cf6d8a681fec80cca858
tree944be11156941821050a504a442a7e46b87a1fd7
parentc19214424b0f8ca0dfa5970880e54807880c443c
s3: Fix streams enumeration bug in OneFS implementation

Previously, we didn’t call SMB_VFS_OPEN_DIR from the streams module,
instead we called fdopendir(). As a result we failed to populate the
dir_state list in the readdirplus module. So when we tried to view the
stream data, we will always returned NULL.

To solve this I separated onefs_opendir() and the initialization of
the dir_state list. This is done by introducing a new utility function
“onefs_rdp_add_dir_state()”, which initializes the dir_state structure
and adds it to the dir_state list.  This function is called from the
streams module before calling readdir().
source3/modules/onefs.h
source3/modules/onefs_dir.c
source3/modules/onefs_streams.c