From ae2dff809dd2594538c6df7d8e1ab2078e7f4875 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 16 Jul 2010 07:56:18 +0200 Subject: [PATCH] README update --- README | 100 ++++++++++++++++++++++++++++++++++++++++++++++++---- test/go | 2 +- test/runtty | 4 ++- 3 files changed, 98 insertions(+), 8 deletions(-) diff --git a/README b/README index 0feb476..14da9c6 100644 --- a/README +++ b/README @@ -4917,6 +4917,10 @@ DONE 7l/ make sure i_blocks is correct. So all is good. What about quota? - hidden in quota_allocate / qcommit +7m/ delete inode could not progress through inode_map_free, so + ORPH: [ce545f08]0/290(1663)r4E:Valid,Dirty,Async,UninCredit,Claimed,PhysValid,Orphan(0) async(1) delete_inode(1) orphan_list(1) drop(1) + was permanently an orphan. + DONE 8/ looping in do_checkpoint root is still i Phase1 because 0/2 is in Phase 1 [cfa57c58]0/2(2078)r1E:Pinned,Phase1,WPhase0,Valid,Dirty,C,CI,CN,CNI,UninCredit,IOLock,PhysValid writepageflush(1) @@ -4934,7 +4938,7 @@ DONE 9/ cluster.c:478 Probably just a bad 'bug' given recent changes. No, I think it is the race between truncate and clean which is now fixed. -10/ inode.c:606 +SEEMS TO BE GONE 10/ inode.c:606 Deleting inode 328: 2+0+0 1+0 2 level index. @@ -4963,12 +4967,16 @@ DONE 13/ delete_inode should wait for pending truncate to complete. Actually it requires i_alloc_sem, or the inode to be deleted. -14/ Review writepage and flush and make sure we flush often enough but +DONE 14/ Review writepage and flush and make sure we flush often enough but not too often. Probably just remove the cluster_flush from write-page as lafs_flush will do that. But leave for now as it encourages heavy indexing. +DONE 14a/ use bio_add_page to write clusters. + +14b/ Figure out what backing_dev to presented for the filesystem. + DONE 15/ The inode map file lost some credits. I think it losts a PinPending because it isn't locked properly. Don't clear PinPending if someone else might have set it. @@ -4982,7 +4990,7 @@ DONE 15b/ Report directory size less confusingly DONE 15d/ What does I_Dirty mean - and implement it. -15e/ setattr should queue an update for the inode metadata. +FIXED 15e/ setattr should queue an update for the inode metadata. and clean up lafs_write_inode at the same time (it shouldn't do an update). and confirm when s_dirt should be set. It causes fsync to run a checkpoint. @@ -5001,6 +5009,8 @@ DONE 15d/ What does I_Dirty mean - and implement it. 15j/ review rules in getref_locked - and document them + - fix accesses to iblock + 15k/ newblocks should probably be a count of segments. Review that. 15l/ make sure checkpoint_youth is decayed properly. Review youth decay. @@ -5015,7 +5025,7 @@ DONE 15d/ What does I_Dirty mean - and implement it. pin blocks in old phase? Do I need to check for them? 15p/ Review and remove the 'if cleaner is active then don't checkpoint just - yet' think - or somehow avoid the yuckiness. + yet' thing - or somehow avoid the yuckiness. 15q/ check checksums when reading cluster_header @@ -5034,6 +5044,7 @@ DONE 15d/ What does I_Dirty mean - and implement it. 15x/ Consider caching result of a failed dir lookup in case we immediately try to create it. Would this actually save anything significant? + 15y/ Don't make dir blocks into orphans if it cannot be needed? 15z/ make sure symlink creation is safe - do I need to log the body?? @@ -5161,7 +5172,6 @@ DONE 15d/ What does I_Dirty mean - and implement it. - use new write_begin / write_end - review how we ensure that credit remain with block. - 16/ Update locking.doc 17/ cluster_flush calls lafs_cluster_allocate calls lafs_add_block_address @@ -5261,7 +5271,18 @@ DONE 15d/ What does I_Dirty mean - and implement it. - add a device to an live array - remove a device from a live array -52/ Review roll-forward completely. +DONE 52/ NFS export + +53/ 'overlay' support + So I mount one device read-only an another device + writable which gets all the updates. metadata on first + device not updated. + +54/ cluster support - is this possible? + +55/ is any useful variant of reflink possible? + +56/ Review roll-forward completely. 26June2010 Investigating 5a @@ -5848,3 +5869,70 @@ Need to improve the fix though. never-ending cleaning? Maybe just computer slow ?? + +11July2010 - on plane to Prague. + How can we safely access ->iblock? + normally iolock, but how do we get iolock? + - flush data to inode + - cluster flush takes private_lock + - private_lock is used to set to null. + I guess we use private_lock to get a reference + then iolock and revalidate + but I can probably test for NULL at any time? though that can change under private_lock + If we own a reference to a child with a parent, then we can use + rcu_dereference to get a ref which might change + +12july2010 + + ->write_inode is called by write_inode() called by __sync_single_inode + to handle I_DIRTY_SYNC|I_DIRTY_DATASYNC after do_writepages + Do we care? + + change to addresss we already handle with checkpoints + change due to setattr we can handle directly if we want + that just cleans mtime/ctime and atime. + mtime/ctime calls ->dirty_inode + as does atime + + So: + getattr changes set I_Dirty so that when cluster_allocate + happens all the changes get saved. + + when dirty_inode is called, we set I_Dirty but don't dirty + the inode block. + If anything happened to justify an inode write, it will + be dirty anyway. If it isn't, this is just atime + + So on dirty_inode we check if atime has changed and if so + we schedule change to atime file + + sync_inode should write an update for the inode if I_Dirty + but sync_filesystems should not + + Simple. fsync calls ->fsync. We get that to write an + inode update, but nothing else does. + + Possibly all directory updates could be chained onto a + directory and only written when fsync is requested before + a checkpoint. + both sides of a rename ?? + leave that for later. + +WritePhase - what is that all about? + We must not change a block while it is being written to previous + phase, else we corrupt causality. + But we probably don't want to change it any way as that would + mess up any checksum or duplication. + + So we want to ignore WritePhase - scrap it. + Before changing a block, we must iolock_written + - all dir updates + - inode update in fsync + - orphan file + - segusage? + - quotas? + + But what about regular data. If prepare_write finds a block in + writeback, do I need to wait, or can I just mark it dirty in + commit_write? If no checksum and no duplication applies, this should + be fine. diff --git a/test/go b/test/go index 9a92b82..13bf6a1 100644 --- a/test/go +++ b/test/go @@ -1,6 +1,6 @@ #!/bin/sh -if [ `tty` != "/dev/tty1" ] +if [ `tty` != "/dev/ttyS0" ] then exit 0 fi # script to run inside qemu diff --git a/test/runtty b/test/runtty index 4d7490b..77e3b79 100644 --- a/test/runtty +++ b/test/runtty @@ -11,9 +11,11 @@ set -e #umount /mnt/test rm -f /tmp/tftp ln -s $dir /tmp/tftp +# -serial stdio or -nographic +# change tty choice in 'go' too. qemu -hda hda -hdb $dir/../../code2/fred -hdc $dir/../../code2/frog \ -no-reboot \ -net nic,model=ne2k_pci -net user \ - -m 256 -serial stdio \ + -m 256 -nographic \ -kernel /home/src/lafs-2.6.27/arch/i386/boot/bzImage \ -append "root=/dev/hda1 console=ttyS0" -tftp /tmp/tftp -- 2.39.5