bugdavfs2 - Bugs: bug #61049, Updated file content only visible...

 
 

bug #61049: Updated file content only visible on the client after a second read

Submitter:  None
Submitted:  Tue 17 Aug 2021 11:29:18 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  alix82
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 17 Aug 2021 12:27:00 PM UTC, comment #1: 

Sorry, I submitted as Anonymous, I've created an account, not sure if I can the 'Submitted by:' bit.

Ali Abdallah <alix82>
Group administrator
Tue 17 Aug 2021 11:29:18 AM UTC, original submission:  

I have a setup composed of a apache webdav server and a client using davfs2.

When content is added to a file on the server, it requires to read to be visible on the client.

Step to reproduce:

SERVER# date > /srv/www/dav/TEST
CLIENT# cat /mnt/dav/TEST
SERVER# date >> /srv/www/dav/TEST
CLIENT# cat /mnt/dav/TEST

The last client read shows only the old content, another cat on the TEST file shows the new content.

In dav_fuse, on open/read/close sequence, fuse_lookup is called before fuse_read to get the file attributes, but the size set to fuse_entry_out reflects the old size, not the new one. So when the read is performed, more data is written to the /dev/fuse device than the file size attribute. On the next read, the file size attribute is set to the size of the updated cache file, that's why it requires two read to get the updated content.

I'm proposing a patch to always call update_cache_file on dav_lookup. Please let me know what do you think.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #52160:  0001-Always-update-cached-file-on-dav_lookup.patch added by alix82 (825B - text/x-patch - Proposed patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by alix82 (Posted a comment)
  • -email is unavailable- added by alix82
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-11-09 alix82 Assigned toNone alix82
    2021-11-09 alix82 StatusNone Fixed
        Open/ClosedOpen Closed
    2021-10-27 alix82 Attached File- Added 0001-Always-update-cached-file-on-dav_lookup.patch, #52160
    2021-08-17 alix82 Carbon-Copy- Added -email is unavailable-
    2021-08-17 None Attached File- Added 0001-Always-update-file-cache-on-dav_lookup.patch, #51793

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code