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

 
 

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

Submitted by:  None
Submitted on:  Tue 17 Aug 2021 11:29:18 AM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
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

 

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
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-08-17 alix82 Carbon-Copy- => Added ali.abdallah@suse.com
    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.7