1. 23 Jul, 2012 1 commit
    • Prasad Joshi's avatar
      logfs: create a pagecache page if it is not present · ddb24bba
      Prasad Joshi authored
      While writing the partial journal entries we assumed that the page
      associated with the journal would always in locatable. This incorrect
      assumption resulted in the following BUG
      
      kernel BUG at /home/benixon/WD_SMR/kernels/linux-3.3.7-logfs/fs/logfs/journal.c:569!
      EIP is at logfs_write_area+0xb6/0x109 [logfs]
      EAX: 00000000 EBX: 00000000 ECX: ef6efea4 EDX: 00000000
      ESI: 001b9000 EDI: f009e000 EBP: c3c13f14 ESP: c3c13ef0
      DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      Process sync (pid: 1799, ti=c3c12000 task=f07825b0 task.ti=c3c12000)
      Stack:
      01001000 c3c13f26 781b9000 00000000 f009e000 f7286000 f1f83400 f8445071
      f1f83400 c3c13f30 f8445ae9 c3c13f20 0000100a 000ee000 f009e000 00000001
      c3c13f5c f8445d17 c05eb0ee 00000000 f1f83400 ef718000 f009e25c ea9c3d80
      Call Trace:
      [<f8445071>] ? account_shadow+0x16d/0x16d [logfs]
      [<f8445ae9>] logfs_write_je+0x2a/0x44 [logfs]
      [<f8445d17>] logfs_write_anchor+0x114/0x228 [logfs]
      [<c05eb0ee>] ? empty+0x5/0x5
      [<f8444522>] logfs_sync_fs+0x1e/0x31 [logfs]
      [<c051be66>] __sync_filesystem+0x5d/0x6f
      [<c051be8d>] sync_one_sb+0x15/0x17
      [<c04ff8b0>] iterate_supers+0x59/0x9a
      [<c051be78>] ? __sync_filesystem+0x6f/0x6f
      [<c051befc>] sys_sync+0x29/0x4f
      [<c084285f>] sysenter_do_call+0x12/0x28
      EIP: [<f8445127>] logfs_write_area+0xb6/0x109 [logfs] SS:ESP 0068:c3c13ef0
      ---[ end trace ef6e9ef52601a945 ]---
      
      The fix is to create the pagecache page if it is not locatable.
      Reported-and-tested-by: default avatarBenixon Dhas <Benixon.Dhas@wdc.com>
      Signed-off-by: default avatarPrasad Joshi <prasadjoshi.linux@gmail.com>
      ddb24bba
  2. 02 Apr, 2012 2 commits
    • Prasad Joshi's avatar
      logfs: initialize the number of iovecs in bio · cd8bfa9c
      Prasad Joshi authored
      This fixes the following crash when a LogFS file system, created on a
      encrypted LVM volume, was mounted
      
      [  526.548034] BUG: unable to handle kernel NULL pointer dereference at
      [  526.550106] IP: [<ffffffff8131ecab>] memcpy+0xb/0x120
      [  526.551008] PGD bd60067 PUD 1778d067 PMD 0
      [  526.551783] Oops: 0000 [#1] SMP
      
      <d>Pid: 2043, comm: mount
      <d>RIP: 0010:[<ffffffff8131ecab>]  [<ffffffff8131ecab>] memcpy+0xb/0x120
      Call Trace:
      	kcryptd_io_read+0xdb/0x100
      	crypt_map+0xfd/0x190
      	__map_bio+0x48/0x150
      	__split_and_process_bio+0x51b/0x630
      	dm_request+0x138/0x230
      	generic_make_request+0xca/0x100
      	submit_bio+0x87/0x110
      	sync_request+0xdd/0x120 [logfs]
      	bdev_readpage+0x2e/0x70 [logfs]
      	do_read_cache_page+0x82/0x180
      	logfs_mount+0x2ad/0x770 [logfs]
      	mount_fs+0x47/0x1c0
      	vfs_kern_mount+0x72/0x110
      	do_kern_mount+0x54/0x110
      	do_mount+0x520/0x7f0
      	sys_mount+0x90/0xe0
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42292Reported-by: default avatarWitold Baryluk <baryluk@smp.if.uj.edu.pl>
      Signed-off-by: default avatarPrasad Joshi <prasadjoshi.linux@gmail.com>
      cd8bfa9c
    • Prasad Joshi's avatar
      logfs: destroy the reserved inodes while unmounting · d2dcd908
      Prasad Joshi authored
      We were assuming that the evict_inode() would never be called on
      reserved inodes. However, (after the commit 8e22c1a4 logfs: get rid
      of magical inodes) while unmounting the file system, in put_super, we
      call iput() on all of the reserved inodes.
      
      The following simple test used to cause a kernel panic on LogFS:
      
      1. Mount a LogFS file system on /mnt
      
      2. Create a file
         $ touch /mnt/a
      
      3. Try to unmount the FS
         $ umount /mnt
      
      The simple fix would be to drop the assumption and properly destroy
      the reserved inodes.
      Signed-off-by: default avatarPrasad Joshi <prasadjoshi.linux@gmail.com>
      d2dcd908
  3. 31 Mar, 2012 37 commits