Reallocation of freed BJ_Forget buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Hello,

  First I'd like to briefly remind the bug I was fixing recently
(or you can read the original report in:
http://marc.theaimsgroup.com/?l=linux_fsdevel&m=114513520128759&w=2).
The original problem is that when we are processing BJ_Forget list in
journal_commit_transaction() we can process bitmap buffer before some
buffer that was deleted by the committing transaction. As soon as bitmap
buffer is processed we can reallocate all the blocks freed by the
comitting transaction. Hence if there are still some unprocessed deleted
buffers on the BJ_Forget list, we will BUG as we think they should not
have been reallocated.
  The fix (currently in -mm) was to not BUG in such a case but file the
buffer to BJ_Metadata list of the running transaction. But that is not
actually correct at all times. If the buffer is not jbddirty, it should
rather be filed into BJ_Reserved list (non-dirty buffer in BJ_Metadata
list is a bug). In theory there could be even cases when the buffer
should be filed in BJ_Forget list of the running transaction (if the
buffer was reallocated and freed before we managed to process the
BJ_Forget list of the comitting transaction). To make it short I think
this gets rather hairy and some better solution is really needed.
  Maybe we could allow do_get_write_access and similar functions to
remove buffer from BJ_Forget list of the comitting transaction. That would
complicate a bit the locking of BJ_Forget list but it should be doable.
  Does anyone else have some idea?

							Honza
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux