1. 12 6月, 2009 3 次提交
    • R
      nilfs2: correct exclusion control in nilfs_remount function · e59399d0
      Ryusuke Konishi 提交于
      nilfs_remount() changes mount state of a superblock instance.  Even
      though nilfs accesses other superblock instances during mount or
      remount, the mount state was not properly protected in
      nilfs_remount().
      
      Moreover, nilfs_remount() has a lock order reversal problem;
      nilfs_get_sb() holds:
      
        1. bdev->bd_mount_sem
        2. sb->s_umount  (sget acquires)
      
      and nilfs_remount() holds:
      
        1. sb->s_umount  (locked by the caller in vfs)
        2. bdev->bd_mount_sem
      
      To avoid these problems, this patch divides a semaphore protecting
      super block instances from nilfs->ns_sem, and applies it to the mount
      state protection in nilfs_remount().
      
      With this change, bd_mount_sem use is removed from nilfs_remount() and
      the lock order reversal will be resolved.  And the new rw-semaphore,
      nilfs->ns_super_sem will properly protect the mount state except the
      modification from nilfs_error function.
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      e59399d0
    • R
      nilfs2: simplify remaining sget() use · 6dd47406
      Ryusuke Konishi 提交于
      This simplifies the test function passed on the remaining sget()
      callsite in nilfs.
      
      Instead of checking mount type (i.e. ro-mount/rw-mount/snapshot mount)
      in the test function passed to sget(), this patch first looks up the
      nilfs_sb_info struct which the given mount type matches, and then
      acquires the super block instance holding the nilfs_sb_info.
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6dd47406
    • R
      nilfs2: get rid of sget use for acquiring nilfs object · 33c8e57c
      Ryusuke Konishi 提交于
      This will change the way to obtain nilfs object in nilfs_get_sb()
      function.
      
      Previously, a preliminary sget() call was performed, and the nilfs
      object was acquired from a super block instance found by the sget()
      call.
      
      This patch, instead, instroduces a new dedicated function
      find_or_create_nilfs(); as the name implies, the function finds an
      existent nilfs object from a global list or creates a new one if no
      object is found on the device.
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      33c8e57c
  2. 23 5月, 2009 1 次提交
  3. 13 4月, 2009 1 次提交
    • R
      nilfs2: fix lockdep recursive locking warning on meta data files · c2698e50
      Ryusuke Konishi 提交于
      This fixes the following false detection of lockdep against nilfs meta
      data files:
      
      =============================================
      [ INFO: possible recursive locking detected ]
      2.6.29 #26
      ---------------------------------------------
      mount.nilfs2/4185 is trying to acquire lock:
       (&mi->mi_sem){----}, at: [<d0c7925b>] nilfs_sufile_get_stat+0x1e/0x105 [nilfs2]
       but task is already holding lock:
        (&mi->mi_sem){----}, at: [<d0c72026>] nilfs_count_free_blocks+0x48/0x84 [nilfs2]
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      c2698e50
  4. 07 4月, 2009 4 次提交