Skip to content

Treesize propagation broken in collaborative mode #1389

@rhafer

Description

@rhafer

Describe the bug

With WATCH_FS enabled. OpenCloud doesn't correctly account for files being deleted directly from
the filesystem.

Steps to reproduce

  1. Start OpenCloud in collaborative mode (STORAGE_USERS_POSIX_WATCH_FS="true")
  2. Create files in the personal space of a user:
    ~/.opencloud/storage/users/users/056fc874-dd7f-11ef-ba84-af6fca4b7289 # echo 1234 > test1
    ~/.opencloud/storage/users/users/056fc874-dd7f-11ef-ba84-af6fca4b7289 # echo 1234 > test2 
    ~/.opencloud/storage/users/users/056fc874-dd7f-11ef-ba84-af6fca4b7289 # echo 1234 > test3
    
  3. check diskusage and xattrs (looks go so far):
    ~/.opencloud/storage/users/users/056fc874-dd7f-11ef-ba84-af6fca4b7289 # du -bs .
    15      .
    ~/.opencloud/storage/users/users/056fc874-dd7f-11ef-ba84-af6fca4b7289 # xattr -l .                                        
    user.oc.treesize: 15
    ...
    
  4. remove a file and check again (the numbers in the xattrs haven't been updated):
    ~/.opencloud/storage/users/users/056fc874-dd7f-11ef-ba84-af6fca4b7289 # rm test3
    ~/.opencloud/storage/users/users/056fc874-dd7f-11ef-ba84-af6fca4b7289 # du -bs .
    10      .
    ~/.opencloud/storage/users/users/056fc874-dd7f-11ef-ba84-af6fca4b7289 # xattr -l .
    user.oc.treesize: 15
    ...
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Qualification

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions