1. 08 12月, 2006 1 次提交
    • S
      [PATCH] fix reiserfs bad path release panic · 87b4126f
      Suzuki K P 提交于
      One of our test team hit a reiserfs_panic while running fsstress tests on
      2.6.19-rc1.  The message looks like :
      
        REISERFS: panic(device Null superblock):
        reiserfs[5676]: assertion !(p->path_length != 1 ) failed at
        fs/reiserfs/stree.c:397:reiserfs_check_path: path not properly relsed.
      
      The backtrace looked :
      
        kernel BUG in reiserfs_panic at fs/reiserfs/prints.c:361!
      	.reiserfs_check_path+0x58/0x74
      	.reiserfs_get_block+0x1444/0x1508
      	.__block_prepare_write+0x1c8/0x558
      	.block_prepare_write+0x34/0x64
      	.reiserfs_prepare_write+0x118/0x1d0
      	.generic_file_buffered_write+0x314/0x82c
      	.__generic_file_aio_write_nolock+0x350/0x3e0
      	.__generic_file_write_nolock+0x78/0xb0
      	.generic_file_write+0x60/0xf0
      	.reiserfs_file_write+0x198/0x2038
      	.vfs_write+0xd0/0x1b4
      	.sys_write+0x4c/0x8c
      	syscall_exit+0x0/0x4
      
      Upon debugging I found that the restart_transaction was not releasing
      the path if the th->refcount was > 1.
      
      /*static*/
      int restart_transaction(struct reiserfs_transaction_handle *th,
                                 			struct inode *inode, struct path *path)
      {
      	[...]
      
               /* we cannot restart while nested */
               if (th->t_refcount > 1) { <<- Path is not released in this case!
                       return 0;
               }
      
               pathrelse(path); <<- Path released here.
      	[...]
      
      This could happen in such a situation :
      
      In reiserfs/inode.c: reiserfs_get_block() ::
      
            if (repeat == NO_DISK_SPACE || repeat == QUOTA_EXCEEDED) {
                /* restart the transaction to give the journal a chance to free
                 ** some blocks.  releases the path, so we have to go back to
                 ** research if we succeed on the second try
                 */
                SB_JOURNAL(inode->i_sb)->j_next_async_flush = 1;
      
              -->>  retval = restart_transaction(th, inode, &path); <<--
      
        We are supposed to release the path, no matter we succeed or fail. But
      if the th->refcount is > 1, the path is still valid. And,
      
                if (retval)
                         goto failure;
                repeat =
                    _allocate_block(th, block, inode,
                                   &allocated_block_nr, NULL, create);
      
      If the above allocate_block fails with NO_DISK_SPACE or QUOTA_EXCEEDED,
      we would have path which is not released.
      
               if (repeat != NO_DISK_SPACE && repeat != QUOTA_EXCEEDED) {
                         goto research;
               }
               if (repeat == QUOTA_EXCEEDED)
                         retval = -EDQUOT;
               else
                         retval = -ENOSPC;
               goto failure;
      	[...]
      
             failure:
      	[...]
               reiserfs_check_path(&path); << Panics here !
      
      Attached here is a patch which could fix the issue.
      
      fix reiserfs/inode.c : restart_transaction() to release the path in all
      cases.
      
      The restart_transaction() doesn't release the path when the the journal
      handle has a refcount > 1.  This would trigger a reiserfs_panic() if we
      encounter an -ENOSPC / -EDQUOT in reiserfs_get_block().
      Signed-off-by: NSuzuki K P <suzuki@in.ibm.com>
      Cc: "Vladimir V. Saveliev" <vs@namesys.com>
      Cc: <reiserfs-dev@namesys.com>
      Cc: Jeff Mahoney <jeffm@suse.com>
      Acked-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      87b4126f
  2. 04 10月, 2006 1 次提交
  3. 30 9月, 2006 2 次提交
  4. 27 9月, 2006 1 次提交
  5. 06 8月, 2006 2 次提交
  6. 02 7月, 2006 1 次提交
  7. 01 7月, 2006 1 次提交
  8. 29 6月, 2006 1 次提交
  9. 27 3月, 2006 2 次提交
  10. 03 3月, 2006 1 次提交
  11. 02 2月, 2006 2 次提交
    • C
      [PATCH] reiserfs: reiserfs hang and performance fix for data=journal mode · e0e851cf
      Chris Mason 提交于
      In data=journal mode, reiserfs writepage needs to make sure not to trigger
      transactions while being run under PF_MEMALLOC.  This patch makes sure to
      redirty the page instead of forcing a transaction start in this case.
      
      Also, calling filemap_fdata* in order to trigger io on the block device can
      cause lock inversions on the page lock.  Instead, do simple batching from
      flush_commit_list.
      Signed-off-by: NChris Mason <mason@suse.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e0e851cf
    • C
      [PATCH] resierfs: fix reiserfs_invalidatepage race against data=ordered · d62b1b87
      Chris Mason 提交于
      After a transaction has closed but before it has finished commit, there is
      a window where data=ordered mode requires invalidatepage to pin pages
      instead of freeing them.  This patch fixes a race between the
      invalidatepage checks and data=ordered writeback, and it also adds a check
      to the reiserfs write_ordered_buffers routines to write any anonymous
      buffers that were dirtied after its first writeback loop.
      
      That bug works like this:
      
      proc1: transaction closes and a new one starts
      proc1: write_ordered_buffers starts processing data=ordered list
      proc1: buffer A is cleaned and written
      proc2: buffer A is dirtied by another process
      proc2: File is truncated to zero, page A goes through invalidatepage
      proc2: reiserfs_invalidatepage sees dirty buffer A with reiserfs
             journal head, pins it
      proc1: write_ordered_buffers frees the journal head on buffer A
      
      At this point, buffer A stays dirty forever
      Signed-off-by: NChris Mason <mason@suse.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d62b1b87
  12. 10 1月, 2006 1 次提交
  13. 15 12月, 2005 1 次提交
  14. 29 11月, 2005 1 次提交
  15. 28 10月, 2005 1 次提交
    • A
      [PATCH] gfp_t: fs/* · 27496a8c
      Al Viro 提交于
       - ->releasepage() annotated (s/int/gfp_t), instances updated
       - missing gfp_t in fs/* added
       - fixed misannotation from the original sweep caught by bitwise checks:
         XFS used __nocast both for gfp_t and for flags used by XFS allocator.
         The latter left with unsigned int __nocast; we might want to add a
         different type for those but for now let's leave them alone.  That,
         BTW, is a case when __nocast use had been actively confusing - it had
         been used in the same code for two different and similar types, with
         no way to catch misuses.  Switch of gfp_t to bitwise had caught that
         immediately...
      
      One tricky bit is left alone to be dealt with later - mapping->flags is
      a mix of gfp_t and error indications.  Left alone for now.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      27496a8c
  16. 13 9月, 2005 1 次提交
  17. 10 9月, 2005 1 次提交
  18. 19 8月, 2005 1 次提交
  19. 28 7月, 2005 1 次提交
  20. 13 7月, 2005 1 次提交
    • L
      reiserfs: run scripts/Lindent on reiserfs code · bd4c625c
      Linus Torvalds 提交于
      This was a pure indentation change, using:
      
      	scripts/Lindent fs/reiserfs/*.c include/linux/reiserfs_*.h
      
      to make reiserfs match the regular Linux indentation style.  As Jeff
      Mahoney <jeffm@suse.com> writes:
      
       The ReiserFS code is a mix of a number of different coding styles, sometimes
       different even from line-to-line. Since the code has been relatively stable
       for quite some time and there are few outstanding patches to be applied, it
       is time to reformat the code to conform to the Linux style standard outlined
       in Documentation/CodingStyle.
      
       This patch contains the result of running scripts/Lindent against
       fs/reiserfs/*.c and include/linux/reiserfs_*.h. There are places where the
       code can be made to look better, but I'd rather keep those patches separate
       so that there isn't a subtle by-hand hand accident in the middle of a huge
       patch. To be clear: This patch is reformatting *only*.
      
       A number of patches may follow that continue to make the code more consistent
       with the Linux coding style.
      
       Hans wasn't particularly enthusiastic about these patches, but said he
       wouldn't really oppose them either.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      bd4c625c
  21. 26 6月, 2005 1 次提交
  22. 24 6月, 2005 2 次提交
  23. 01 5月, 2005 2 次提交
  24. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4