On 11/8/19 5:06 AM, fanzi2009(a)hotmail.com wrote:
Hi Guys,
I tried to write files through FSAL_RGW and it's successful. But after a little
while, I found all the file size become 0. I just follow the writing logic for FSAL_RGW.
I found the `RGW_OPEN_FLAG_V3` is only set when state (which is a parameter
rgw_fsal_open2() in ) is NULL. However, it seems that the `state` is always NOT NULL.
When I changed the code to transfer RGW_OPEN_FLAG_V3 into rgw_open, the issue is gone.
Is there any other guy meet a similar issue?
```
rc = rgw_open(export->rgw_fs, handle->rgw_fh, posix_flags,
(!state) ? RGW_OPEN_FLAG_V3 : RGW_OPEN_FLAG_NONE);
```
RGW_OPEN_FLAG_V3 indicates to RGW that this is an anonymous I/O, as is
done by NFSv3. It should only be passed when state is NULL, so the code
is correct as currently written.
I'm CC'ing Matt, who wrote this code.
Daniel