Re: [git pull] vfs series, part 1

Previous thread: RE: find_task_by_pid() problem by Namhyung Kim on Monday, August 9, 2010 - 8:32 pm. (2 messages)

Next thread: linux-next: Tree for August 10 by Stephen Rothwell on Monday, August 9, 2010 - 8:56 pm. (6 messages)
From: Al Viro
Date: Monday, August 9, 2010 - 8:35 pm

Assorted work from the last cycle; among other things, there's
a filesystem API change (->evict_inode() series), a lot of truncate
rework stuff (mostly by Chris) and a bunch of fixes.

	This is _not_ all; in particular, there's pending freeze/thaw
locking rework and I would really like to see inode_lock splitup
series separated and posted.  Along with vfsmount_lock and files_lock
work.  Nick, could you do that ASAP, please?

	Please, pull from
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6.git/ for-linus

	Shortlog:
Al Viro (69):
      Deal with missing exports for hostfs
      missing include in hppfs
      Fix reiserfs_file_release()
      fix leak in __logfs_create()
      jffs2: don't open-code iget_failed()
      get rid of file_fsync()
      simplify checks for I_CLEAR/I_FREEING
      unify fs/inode.c callers of clear_inode()
      New method - evict_inode()
      switch hugetlbfs to ->evict_inode()
      generic_detach_inode() can be static now
      Take ->i_bdev/->i_cdev handling out of clear_inode()
      new helper: end_writeback()
      switch hypfs to ->evict_inode()
      simplify get_cramfs_inode()
      switch procfs to ->evict_inode()
      switch sysfs to ->evict_inode()
      switch minix to ->evict_inode(), fix write_inode/delete_inode race
      ext2: switch to dquot_free_block_nodirty()
      Take dirtying the inode to callers of ext2_free_blocks()
      Don't dirty the victim in ext2_xattr_delete_inode()
      merge ext2 delete_inode and clear_inode, switch to ->evict_inode()
      switch mqueue to ->evict_inode()
      switch shmem.c to ->evice_inode()
      switch sysv to ->evict_inode()
      switch smbfs to evict_inode()
      covert fatfs to ->evict_inode()
      switch ufs to ->evict_inode()
      spufs conversion to ->evict_inode()
      convert ext3 to ->evict_inode()
      switch bfs to ->evict_inode(), clean up
      switch omfs to ->evict_inode()
      switch affs to ->evict_inode()
      stop icache pollution in ...
From: Stephen Rothwell
Date: Monday, August 9, 2010 - 9:40 pm

Hi Al,


Having just fetched your for-next branch, they appear to have been rolled
in.  Thanks.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
From: Nick Piggin
Date: Tuesday, August 10, 2010 - 3:17 am

My laptop is dead so it will have to wait until the end of the week
when I get home.
I'll do that as soon as possible.
--

From: Jouni Malinen
Date: Tuesday, August 17, 2010 - 6:14 am

Linux 2.6.36-rc1 seemed to break my UML hostfs setup or well, make it
behave in very odd ways.. No matter what directory I'm trying to read
from hostfs in UML, the root directory seems to be returned. I have
hostfs mounted in UML into /mnt/host and "ls /mnt/host" and "ls
/mnt/host/etc" show the same directory. Actually, any unknown
directory like "/mnt/host/does-not-exist" shows the same root
directory.. Obviously something is going quite wrong in mapping the
path name to directory entry.

 Based on a quick git bisect, the main part of the issue seems to be

e9193059b1b3733695d5b80e667778311695aa73 is the first bad commit
commit e9193059b1b3733695d5b80e667778311695aa73
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Sun Jun 6 23:16:34 2010 -0400

    hostfs: fix races in dentry_name() and inode_name()

    calculating size, then doing allocation, then filling the
    path is a Bad Idea(tm), since the ancestors can be renamed,
    leading to buffer overrun.

    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

In addition, reverting just that commit allows hostfs to be used with
2.6.36-rc1. Though, there seems to be some additional issues with
symlinks, so there could be something else related to this change that
is actually causing the problems. The other issues result in memory
allocation failing when reading symlinks:

# ls /mnt/host/
ls: cannot read symbolic link /mnt/host/vmlinuz: Cannot allocate memory
ls: cannot read symbolic link /mnt/host/vmlinuz.old: Cannot allocate memory

(this is not only limited to ls; "ln -s p.patch a.patch; cat a.patch"
results in same from cat)

Other than that, hostfs seems to be working, though.

Any idea what caused this regression and how to fix it properly? I can
work around this by reverting the patch pointed out by git bisect, but
surely that is not the proper fix for the issues.

- Jouni
--

Previous thread: RE: find_task_by_pid() problem by Namhyung Kim on Monday, August 9, 2010 - 8:32 pm. (2 messages)

Next thread: linux-next: Tree for August 10 by