Skip to contentSkip to conversation

Questions about inode locks in btrfs sync and fsync.

DISCUSSION Lyu Tao 1 participant 1 message Feb 4, 2022 Btrfs file system

lore
Share & tools
lore

Lyu Tao

author
#0 lore raw

Hi,

I'm new to btrfs and sorry to ask a naive question about the sync and fsync in btrfs.

I browsed kernel code and found btrfs uses inode_lock in fsync() but not in sync(). Is that right? If yes, why not use inode_lock in sync() and does that mean when synchronizing a inode, other process can still write to the inode?

Looking forward to the answers.

Best,
Tao