Project

General

Profile

Actions

Feature #62215

closed

libcephfs: Allow monitoring for any file changes like inotify

Added by Anagh Kumar Baranwal 10 months ago. Updated 9 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Administration/Usability
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Reviewed:
Affected Versions:
Component(FS):
libcephfs
Labels (FS):
Pull request ID:

Description

I wanted to add a Ceph backend for rclone (https://rclone.org/) but it turns out that there is no way to monitor for any file changes so the rclone cache can be invalidated.

I did see an open issue in the corresponding go-ceph library tracker (https://github.com/ceph/go-ceph/issues/478), but it looks like this may be missing in libcephfs itself.

I am hoping that this can be added or if already present, please point out what needs to be used to get the changes.

Actions #1

Updated by Venky Shankar 10 months ago

Hi Anagh,

Anagh Kumar Baranwal wrote:

I wanted to add a Ceph backend for rclone (https://rclone.org/) but it turns out that there is no way to monitor for any file changes so the rclone cache can be invalidated.

I did see an open issue in the corresponding go-ceph library tracker (https://github.com/ceph/go-ceph/issues/478), but it looks like this may be missing in libcephfs itself.

libcephfs does not have such a functionality right now and inotify support is not planned as such at least for the next "S" (squid) release.

I am hoping that this can be added or if already present, please point out what needs to be used to get the changes.

If you can use the ceph kernel driver, I think you can still use the inotify_*() calls and receive notifications for inode changes. Is that something you have considered?

Actions #2

Updated by Anagh Kumar Baranwal 10 months ago

Hi Venky,

Venky Shankar wrote:

Hi Anagh,

Anagh Kumar Baranwal wrote:

libcephfs does not have such a functionality right now and inotify support is not planned as such at least for the next "S" (squid) release.

That's perfectly fine, I am willing to wait till this added since there's no point in adding an rclone backend without cache invalidation anyway.

If you can use the ceph kernel driver, I think you can still use the inotify_*() calls and receive notifications for inode changes. Is that something you have considered?

I do use the Ceph kernel mount right now but I don't think inotify works across the network, does it? I also see this issue for the same: https://tracker.ceph.com/issues/1296

Actions #3

Updated by Venky Shankar 10 months ago

Anagh Kumar Baranwal wrote:

Hi Venky,

Venky Shankar wrote:

Hi Anagh,

Anagh Kumar Baranwal wrote:

libcephfs does not have such a functionality right now and inotify support is not planned as such at least for the next "S" (squid) release.

That's perfectly fine, I am willing to wait till this added since there's no point in adding an rclone backend without cache invalidation anyway.

If you can use the ceph kernel driver, I think you can still use the inotify_*() calls and receive notifications for inode changes. Is that something you have considered?

I do use the Ceph kernel mount right now but I don't think inotify works across the network, does it? I also see this issue for the same: https://tracker.ceph.com/issues/1296

Changes originating from the localhost would obviously be notified to the watcher, but not from another client doing a modification operation. That would require cephfs to extend the MDS protocol and changes to the across cap subsystems.

Actions #4

Updated by Anagh Kumar Baranwal 10 months ago

Venky Shankar wrote:

Changes originating from the localhost would obviously be notified to the watcher, but not from another client doing a modification operation. That would require cephfs to extend the MDS protocol and changes to the across cap subsystems.

Yeah, I am currently running a custom notifier agent to notify the apps using the kernel mounts of any changes which is what led me to the go library for an rclone-native implementation. I am not sure whether providing the list of changes via libcephfs would require similar effort as the kernel inotify implementation or if it would be any easier...

Actions #5

Updated by Venky Shankar 9 months ago

Anagh Kumar Baranwal wrote:

Venky Shankar wrote:

Changes originating from the localhost would obviously be notified to the watcher, but not from another client doing a modification operation. That would require cephfs to extend the MDS protocol and changes to the across cap subsystems.

Yeah, I am currently running a custom notifier agent to notify the apps using the kernel mounts of any changes which is what led me to the go library for an rclone-native implementation. I am not sure whether providing the list of changes via libcephfs would require similar effort as the kernel inotify implementation or if it would be any easier...

Providing support from cephfs would require a good amount of change in the cephfs cap protocol and nothing is planned at the moment related to this.

Actions #6

Updated by Venky Shankar 9 months ago

  • Status changed from New to Rejected

Nothing planned for the foreseeable future related to this feature request.

Actions

Also available in: Atom PDF