Bug 812342 - [FEAT] inotify support
Summary: [FEAT] inotify support
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: GlusterFS
Classification: Community
Component: upcall
Version: mainline
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Soumya Koduri
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-13 12:59 UTC by Joaquin Diaz Trepat
Modified: 2018-11-20 09:30 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-11-20 09:08:26 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
A C program that can test that the GlusterFS does not support inotify (1.59 KB, text/x-csrc)
2012-04-13 12:59 UTC, Joaquin Diaz Trepat
no flags Details

Description Joaquin Diaz Trepat 2012-04-13 12:59:59 UTC
Created attachment 577328 [details]
A C program that can test that the GlusterFS does not support inotify

Description of feature:

Inotify is a Linux kernel feature that monitors file systems and immediately alerts an attentive application to relevant events, such as a delete, read, write, and even an unmount operation. You can also track the origin and destination of a move, among other niceties.
Well, it would be nice to have this implemented in GlusterFS. To register directly to a system call, instead of checking the inode with a program/script.

Version-Release number of selected component (if applicable):

I leave it to your criteria, the version release number. But i think it would be awesome. Contact me if i can help in any way.

How reproducible:

I leave a c source file attached to this request. You can compile it and see that in the mounted point you choose ( you need to edit the file ) got no response from the program.

Steps to Reproduce:
1. Download de file.
2. Edit it and put the path to a mounted GlusterFS.
3. Run it.
  
Actual results:

No stdout

Expected results:

The directory/file was deleted/created/modified

Additional info:

The application creates an inotify instance with fd = inotify_init(); and adds one watch to monitor modifications, new files, and destroyed files in /path/to/mount/point, as specified by wd = inotify_add_watch(...). The read() method blocks until one or more alerts arrive. The specifics of the alert(s)—each file, each event—are sent as a stream of bytes; hence, the loop in the application casts the stream of bytes into a series of event structures.

There is a beautiful article of this, written by Ian Shields in this link http://www.ibm.com/developerworks/linux/library/l-inotify/

Cheers. And thank you, in advance.

Joaquin Diaz Treat

Comment 1 Arie Skliarouk 2013-09-26 18:58:17 UTC
Isn't it already done as described here? http://gluster.org/pipermail/gluster-users/2010-September/005296.html

Comment 2 Joaquin Diaz Trepat 2013-09-26 19:20:07 UTC
I appreciate the time devoted to this inquiry.

The mail describes a way to use inotify in the local storage ( not a GlusterFS file system ) and replicate the files that are changing INTO the GlusterFS.

Quote:
"...Our approach is to 
point the DocumentRoot to the local storage, and use inotify to 
replicate the changes made by Apache to the GlusterFS mountpoint. "

The feature requested in this ticket, is to support inotify IN the mount point of glusterfs such as, it is posible to watch a file inside the mount point:

watch /mount/point/of/glusterfs/somefile

Thanks in advance for any effort put in this.

Cheers

Comment 3 Niels de Vos 2014-11-27 14:45:09 UTC
Feature requests make most sense against the 'mainline' release, there is no ETA for an implementation and requests might get forgotten when filed against a particular version.

Comment 4 Kaleb KEITHLEY 2015-10-22 15:46:38 UTC
because of the large number of bugs filed against mainline version\ is ambiguous and about to be removed as a choice.

If you believe this is still a bug, please change the status back to NEW and choose the appropriate, applicable version for it.

Comment 5 James (purpleidea) 2015-10-22 19:46:53 UTC
I think this is still a valid bug. Changed back to new. Maintainers feel free to correct version, I just put to latest version.

Comment 6 Vijay Bellur 2018-11-20 09:30:11 UTC
Migrated to github:
https://github.com/gluster/glusterfs/issues/585
Please follow the github issue for further updates on this bug.


Note You need to log in before you can comment on or make changes to this bug.