FS#34520 - [linux] 3.8.x - 3.9.x fanotify: fix support of large files

Attached to Project: Arch Linux
Opened by Chris G (epitron) - Saturday, 30 March 2013, 03:06 GMT
Last edited by Tobias Powalowski (tpowa) - Tuesday, 07 May 2013, 06:34 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Linux's new `fanotify` filesystem event notification subsystem lets you monitor all filesystem activity. It's used by the `fatrace` package, and works quite well.

It has a slight bug, however, where it can't handle filesystem events involving files that are > 2gb in size.

This kernel patch fixes it the bug: https://patchwork.kernel.org/patch/2142341/

(I've tested in on v3.8.4, and it works well.)

It's a very tiny patch that basically just adds O_LARGEFILE to an open command, so stability isn't an issue.
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Tuesday, 07 May 2013, 06:34 GMT
Reason for closing:  Not a bug
Comment by Tobias Powalowski (tpowa) - Friday, 05 April 2013, 14:07 GMT
Is this somewhere merged into stable or 3.9?
Comment by Chris G (epitron) - Friday, 05 April 2013, 18:08 GMT
I'm not sure. I know that torvalds' git repo hasn't updated fanotify since Jan 23, 2013.

I was trying to imagine why they didn't merge this in immediately (the patch is from Feb 14, 2013).

Would it cause problems if you tried to open a file on a filesystem that didn't support large files with O_LARGEFILE?
Comment by Dave Reisner (falconindy) - Friday, 05 April 2013, 18:33 GMT
> Is this somewhere merged into stable or 3.9?

This was never merged. Regardless of how trivial the patch may seem, it needs to be merged upstream.
Comment by Chris G (epitron) - Friday, 05 April 2013, 18:49 GMT
So you don't think there is any technical reason not to merge it?
Comment by Dave Reisner (falconindy) - Tuesday, 30 April 2013, 15:21 GMT
> So you don't think there is any technical reason not to merge it?
I'm not qualified to review the patch. Someone who is recently commented that the "fix" seems wrong (see your own patchwork link).
Comment by Heinrich Schuchardt (xypron) - Monday, 06 May 2013, 20:54 GMT
The bug seems to be in fatrace not in fanotify. If you want to watch files > 2 GB call fanotify_init with O_LARGEFILE.

See
http://www.xypron.de/projects/fanotify-manpages/man2/fanotify_init.2.html

Loading...