{"head":"ceadccb714c37c35872f294acd01c64d121499df","size":1,"push_id":45297415,"shas":[["ceadccb714c37c35872f294acd01c64d121499df","78b342861d821967b29f951b7366f5a0267e0c38@redhat.com","Btrfs: inline checksums into the space cache\n\nYeah yeah I know this is how we used to do it and then I changed it, but damnit\nI'm changing it back.  The fact is that writing out checksums will modify\nmetadata, which could cause us to dirty a block group we've already written out,\nso we have to truncate it and all of it's checksums and re-write it which will\nwrite new checksums which could dirty a blockg roup that has already been\nwritten and you see where I'm going with this?  This can cause unmount or really\nanything that depends on a transaction to commit to take it's sweet damned time\nto happen.  So go back to the way it was, only this time we're specifically\nsetting NODATACOW because we can't go through the COW pathway anyway and we're\ndoing our own built-in cow'ing by truncating the free space cache.  The other\nnew thing is once we truncate the old cache and preallocate the new space, we\ndon't need to do that song and dance at all for the rest of the transaction, we\ncan just overwrite the existing space with the new cache if the block group\nchanges for whatever reason, and the NODATACOW will let us do this fine.  So\nkeep track of which transaction we last cleared our cache in and if we cleared\nit in this transaction just say we're all setup and carry on.  This survives\nxfstests and stress.sh.  Thanks,\n\nSigned-off-by: Josef Bacik <josef@redhat.com>","Josef Bacik"]],"ref":"refs/heads/unstable"}