The patch titled inotify: report rounded-up event size to user space has been removed from the -mm tree. Its filename was inotify-reimplement-inotify-using-fsnotify-report-rounded-up-event-size-to-user-space.patch This patch was dropped because other changes were merged, which wrecked this patch The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: inotify: report rounded-up event size to user space From: Wu Fengguang <fengguang.wu@xxxxxxxxx> On Wed, May 06, 2009 at 09:42:58PM +0800, Kay Sievers wrote: > On Mon, May 4, 2009 at 15:30, Wu Fengguang <fengguang.wu@xxxxxxxxx> wrote: > > > I tried remove every udev rules in /etc/udev/ and /lib/udev, the /etc/group > > accesses disappeared in strace, but udevd is still busy. > > > ppoll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=3, events=POLLIN}], 3, NULL, [], 8) = 1 ([{fd=3, revents=POLLIN}]) > > ioctl(3, FIONREAD, [39]) Â Â Â Â Â Â Â Â = 0 > > read(3, 0x62ad60, 39) Â Â Â Â Â Â Â Â Â = -1 EINVAL (Invalid argument) > > Seems, you have issues with inotify on your nfs mount? > > Inotify wakes up udevd to tell something in the rules directory has > changed, but inotify seems not to return anything useful, but keeps > waking us up. That causes an endless loop of parsing rules files. Thanks for the tip. The failed inotify read() is caused by the size *roundup* behavior introduced by the -mm commit 3b46cf7d5f3ca(Reimplement inotify_user using fsnotify). Which says: + /* + * We need to pad the filename so as to properly align an + * array of inotify_event structures. Because the structure is + * small and the common case is a small filename, we just round + * up to the next multiple of the structure's sizeof. This is + * simple and safe for all architectures. + */ The udev madness originates from these kernel testing failures: [ 756.569243] get_one_event: event_size=48 > count=38, name_len=22, name=61-dev-root-link.rules [ 756.600103] get_one_event: event_size=48 > count=38, name_len=22, name=61-dev-root-link.rules [ 756.630265] get_one_event: event_size=48 > count=38, name_len=22, name=61-dev-root-link.rules [ 756.670862] get_one_event: event_size=48 > count=38, name_len=22, name=61-dev-root-link.rules [ 756.701845] get_one_event: event_size=48 > count=38, name_len=22, name=61-dev-root-link.rules [ 756.732899] get_one_event: event_size=48 > count=38, name_len=22, name=61-dev-root-link.rules [ 756.763126] get_one_event: event_size=48 > count=38, name_len=22, name=61-dev-root-link.rules [ 756.794829] get_one_event: event_size=48 > count=38, name_len=22, name=61-dev-root-link.rules [ 756.824985] get_one_event: event_size=48 > count=38, name_len=22, name=61-dev-root-link.rules [ 756.856760] get_one_event: event_size=48 > count=38, name_len=22, name=61-dev-root-link.rules [ 761.608521] __ratelimit: 210 callbacks suppressed Which are printed by the following patch: Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Acked-by: Eric Paris <eparis@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/notify/inotify/inotify_user.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN fs/notify/inotify/inotify_user.c~inotify-reimplement-inotify-using-fsnotify-report-rounded-up-event-size-to-user-space fs/notify/inotify/inotify_user.c --- a/fs/notify/inotify/inotify_user.c~inotify-reimplement-inotify-using-fsnotify-report-rounded-up-event-size-to-user-space +++ a/fs/notify/inotify/inotify_user.c @@ -318,7 +318,9 @@ static long inotify_ioctl(struct file *f mutex_lock(&group->notification_mutex); list_for_each_entry(holder, &group->notification_list, event_list) { event = holder->event; - send_len += sizeof(struct inotify_event) + event->name_len; + send_len += sizeof(struct inotify_event); + send_len += roundup(event->name_len, + sizeof(struct inotify_event)); } mutex_unlock(&group->notification_mutex); ret = put_user(send_len, (int __user *) p); _ Patches currently in -mm which might be from fengguang.wu@xxxxxxxxx are linux-next.patch readahead-make-mmap_miss-an-unsigned-int.patch readahead-move-max_sane_readahead-calls-into-force_page_cache_readahead.patch readahead-apply-max_sane_readahead-limit-in-ondemand_readahead.patch readahead-remove-one-unnecessary-radix-tree-lookup.patch readahead-increase-interleaved-readahead-size.patch readahead-remove-sync-async-readahead-call-dependency.patch readahead-clean-up-and-simplify-the-code-for-filemap-page-fault-readahead.patch readahead-sequential-mmap-readahead.patch readahead-enforce-full-readahead-size-on-async-mmap-readahead.patch readahead-record-mmap-read-around-states-in-file_ra_state.patch radix-tree-add-radix_tree_prev_hole.patch readahead-move-the-random-read-case-to-bottom.patch readahead-introduce-context-readahead-algorithm.patch readahead-introduce-context-readahead-algorithm-update.patch readahead-remove-redundant-test-in-shrink_readahead_size_eio.patch readahead-enforce-full-sync-mmap-readahead-size.patch mm-introduce-pagehuge-for-testing-huge-gigantic-pages.patch mm-introduce-pagehuge-for-testing-huge-gigantic-pages-update.patch proc-kpagecount-kpageflags-code-cleanup.patch proc-export-more-page-flags-in-proc-kpageflags.patch pagemap-document-clarifications.patch pagemap-document-9-more-exported-page-flags.patch pagemap-add-page-types-tool.patch pagemap-export-pg_hwpoison.patch pagemap-export-pg_hwpoison-fix.patch vmscan-cleanup-the-scan-batching-code.patch vmscan-dont-export-nr_saved_scan-in-proc-zoneinfo.patch vmscan-zvc-updates-in-shrink_active_list-can-be-done-once.patch pm-hibernate-rework-shrinking-of-memory.patch pm-hibernate-do-not-release-preallocated-memory-unnecessarily-rev-2.patch pm-hibernate-do-not-try-to-allocate-too-much-memory-too-hard.patch inotify-reimplement-inotify-using-fsnotify-report-rounded-up-event-size-to-user-space.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html