{"push_id":761345866,"size":25,"distinct_size":0,"ref":"refs/heads/leaftest2","head":"262e6de42c1533ddca4049f344f37ce78ed6c23b","before":"309b1170c58df2dc9e2467e19b053889eb6eaabc","commits":[{"sha":"bc996e65ac8d62f57889adc4fa8d028bcbc2c05a","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sys/vfs/hammer: Add (missing)debug print for data reblock\n\nAdd debug kprintf for data reblock since leaf/internal\nnode have it in the same format as this.\n\nAlso add \"%08x\",elm->base.localization to above and the\nexisting debug kprintfs.","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/bc996e65ac8d62f57889adc4fa8d028bcbc2c05a"},{"sha":"16ed94f05bc8aeeab14bda9f83494e5b432fdb97","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sys/vfs/hammer: Fix volume-del issue with >1 pfs\n\nSince 5e1e1454 hammer reblock supports a new option that\ncan reblock all pfses within filesystem.\n\nhammer volume-del needs to use this when it finds the volume\nnot empty and needs to reblock. Otherwise it only reblocks a\nsingle pfs (pfs 0 in this case) and may end up ignoring data\nin other pfses that should have been reblocked from that volume\n(remember that pfs has nothing to do with which volume pfs\ndata/inodes/etc are stored in).\n\nAs the following examples show, hammer volume-del results in\nfailure if the above situation occurs. It fails because data\nin non-pfs0 remains in that volume without being reblocked.\nIf one is lucky that the volume doesn't have non-pfs0 data,\nthen hammer volume-del won't fail even without allpfs=1 set\n(of course given that the whole filesystem has enough space\nfor reblock to succeed).\n\n--\nCreate filesystem that consists of 3 volumes and >1 pfses.\nThe root volume can't be removed, so fill up non-zero pfses\ntill it gets to the second volume while keeping enough space\nfor reblock to succeed. Then try to remove a non-root volume\nthat isn't empty which is /dev/da2 in this case.\n\n  # hammer volume-blkdevs /HAMMER\n  /dev/da1:/dev/da2:/dev/da3    /* /dev/da1 is root volume */\n  # ls -l /HAMMER               /* data exists in pfs 1 to 12 */\n  total 0\n  lrwxr-xr-x  1 root  wheel  10 Aug  9 13:24 master1 -> @@-1:00001\n  lrwxr-xr-x  1 root  wheel  10 Aug  9 13:31 master10 -> @@-1:00010\n  lrwxr-xr-x  1 root  wheel  10 Aug  9 13:32 master11 -> @@-1:00011\n  lrwxr-xr-x  1 root  wheel  10 Aug  9 13:33 master12 -> @@-1:00012\n  lrwxr-xr-x  1 root  wheel  10 Aug  9 13:25 master2 -> @@-1:00002\n  lrwxr-xr-x  1 root  wheel  10 Aug  9 13:26 master3 -> @@-1:00003\n  lrwxr-xr-x  1 root  wheel  10 Aug  9 13:27 master4 -> @@-1:00004\n  lrwxr-xr-x  1 root  wheel  10 Aug  9 13:28 master5 -> @@-1:00005\n  lrwxr-xr-x  1 root  wheel  10 Aug  9 13:29 master6 -> @@-1:00006\n  lrwxr-xr-x  1 root  wheel  10 Aug  9 13:29 master7 -> @@-1:00007\n  lrwxr-xr-x  1 root  wheel  10 Aug  9 13:30 master8 -> @@-1:00008\n  lrwxr-xr-x  1 root  wheel  10 Aug  9 13:31 master9 -> @@-1:00009\n  # df -Th /HAMMER\n  Filesystem  Type     Size   Used  Avail Capacity  Mounted on\n  TEST        hammer   334G   118G   216G    35%    /HAMMER\n  # hammer -f /dev/da1:/dev/da2:/dev/da3 blockmap | grep -A2 layer1\n    layer1 4000000000000000 @2000000000800000 blocks-free 0\n          4000000000000000 zone=4  app=8388608 free=0\n          4000000000800000 zone=4  app=8388608 free=0\n  --\n    layer1 4010000000000000 @2010000000000000 blocks-free 13449\n          4010000000000000 zone=4  app=8388608 free=0\n          4010000000800000 zone=10 app=8388608 free=0\n  --\n    layer1 4020000000000000 @2020000000000000 blocks-free 14268\n          4020000000000000 zone=4  app=8388608 free=0\n          4020000000800000 zone=0  app=0       free=8388608\n\t\t/* /dev/da1 is 100% used,\n\t\t   /dev/da2 is partially used,\n\t\t   /dev/da3 is 0% used */\n\nExample 1. - without allpfs=1 fails in a second because\nthere isn't really anything it can do as there's no data\nin pfs0 except for some inodes and btree nodes, etc.\n  # time hammer volume-del /dev/da2 /HAMMER\n  hammer volume-del ioctl: Device busy\n\n  real    0m0.017s\n  user    0m0.000s\n  sys     0m0.000s\n  # dmesg | tail -2\n  reblock started\n  Failed to free volume: Volume 1 not empty\n\nExample 2. - this commit with allpfs=1 takes 15 min because\nit reblocks all the data in all pfses (mostly from non-pfs0),\nbut successfully removes /dev/da2.\n  # time hammer volume-del /dev/da2 /HAMMER\n\n  real    15m7.664s\n  user    0m0.000s\n  sys     7m36.270s\n  # hammer volume-blkdevs /HAMMER\n  /dev/da1:/dev/da3","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/16ed94f05bc8aeeab14bda9f83494e5b432fdb97"},{"sha":"9a6201233509000378b692d72975b44364b7eef2","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"hammer: Fix unusual line break style","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/9a6201233509000378b692d72975b44364b7eef2"},{"sha":"cdabf05377188faef46ecd3c9aa65c9f411c32de","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sys/vfs/hammer: Fix comments\n\nThese functions return 1 or 0, but not TRUE or FALSE macros.\n(there are also existing comments that use 1/0)","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/cdabf05377188faef46ecd3c9aa65c9f411c32de"},{"sha":"721f311056acc1d8297ce0283ec9eca746158b68","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sys/vfs/hammer: Fix error check on mount\n\nSince it already has failed: that does the same thing,\ngoto failed; on each error case makes code more clear.\n\nRemove error==0 from the first if() conditional since\nerror isn't 0 when hmp->rootvol==NULL.","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/721f311056acc1d8297ce0283ec9eca746158b68"},{"sha":"c302e84437f9ece78d5cdc8ba4ddaa047d58575b","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sys/vfs/hammer: Avoid volume# inconsistency on mount\n\nhammer_vfs_mount() should check and compare # of volumes\nto mount (# of volumes in mount_hammer arg in blkdevs format)\nand vol_count field in volume header.\n\nmount_hammer should fail if they don't match even if it's\ntechnically possible to mount at the moment after newfs.\n\nIn the following Example1, it's possible to safely mount\n/dev/da1 without /dev/da2:/dev/da3 or\n/dev/da1:/dev/da2 without /dev/da3 or\n/dev/da1:/dev/da3 without /dev/da2 at this point because\nboth /dev/da2 and /dev/da3 has no data (only layer2 big-block)\nright after newfs_hammer, however if filesystem has enough\ndata that zone2 next_offset has already reached the missing\nvolume before unmount, there is going to be inconsistency\nbetween blockmap and actual mounted volumes, which results\nin kernel panic. mount needs to avoid this by checking #\nof volumes as the Example2 shows.\n\nExample 1. - newfs 3 volumes and then mount 2 volumes\n  # newfs_hammer -L TEST /dev/da1 /dev/da2 /dev/da3 > /dev/null\n  # mount_hammer /dev/da1:/dev/da2:/dev/da3 /HAMMER\n  # mount | grep /HAMMER\n  TEST on /HAMMER (hammer, local)\n  # hammer volume-blkdevs /HAMMER\n  /dev/da1:/dev/da2:/dev/da3\n  # umount /HAMMER\n  # mount_hammer /dev/da1:/dev/da2 /HAMMER\n  # mount | grep /HAMMER\n  TEST on /HAMMER (hammer, local)\n  # hammer volume-blkdevs /HAMMER\n  /dev/da1:/dev/da2\n\nExample 2. - with this commit it fails to mount\n  # newfs_hammer -L TEST /dev/da1 /dev/da2 /dev/da3 > /dev/null\n  # mount_hammer /dev/da1:/dev/da2:/dev/da3 /HAMMER\n  # mount | grep /HAMMER\n  TEST on /HAMMER (hammer, local)\n  # hammer volume-blkdevs /HAMMER\n  /dev/da1:/dev/da2:/dev/da3\n  # umount /HAMMER\n  # mount_hammer /dev/da1:/dev/da2 /HAMMER\n  mount_hammer: Unknown error: Invalid argument\n  # dmesg | tail -1\n  hammer_mount: volume header says 3 volumes, but 2 installed\n  # mount_hammer /dev/da1 /HAMMER\n  mount_hammer: Unknown error: Invalid argument\n  # dmesg | tail -1\n  hammer_mount: volume header says 3 volumes, but 1 installed","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/c302e84437f9ece78d5cdc8ba4ddaa047d58575b"},{"sha":"4af0f40534b665b5aeb544c2006e7b1c5a2126d6","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sys/vfs/hammer: Fix inconsistent function prototypes\n\nShould use either of the type name or typedef'd name\nfor both function prototype and the function itself.\n\n(hammer mostly uses hammer_mount_t rather than struct\nhammer_mount in this case)","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/4af0f40534b665b5aeb544c2006e7b1c5a2126d6"},{"sha":"542b88c2de0adf8b6d728cc62972cdac21c57e29","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sys/vfs/hammer: Fix wrong function name in kprintf\n\nIt used to be \"hammer_mountroot\" according to 104cb849.\n\"hammer_mount\" still isn't name of a function, but this\nis what other kprintfs around here use.","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/542b88c2de0adf8b6d728cc62972cdac21c57e29"},{"sha":"e682c3854a60ddc3023e1d2bebabeb7cbf279085","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sys/vfs/hammer: Cleanup volume# iteration\n\nif (volume == NULL && error == ENOENT) {...\ncan be removed since now that vol_no must exist.\n\nIf error==ENOENT and hits the assertion right after this,\nthen the code has a bug.","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/e682c3854a60ddc3023e1d2bebabeb7cbf279085"},{"sha":"f819215c3c5604836ea5a73c35ed334df2427798","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sbin/hammer: Add init_boot|mem_area_size()\n\nIntegrate copy-pasted code by 6f3076af into functions.","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/f819215c3c5604836ea5a73c35ed334df2427798"},{"sha":"14bdad8b1ff14b993ee98212147a88a2e3539098","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sys/vfs/ufs: Remove unused ioctl call and variables\n\nSimilar to 30b14d35.\n(Also see r98542 and r104697 of FreeBSD)","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/14bdad8b1ff14b993ee98212147a88a2e3539098"},{"sha":"3aef25e813fe97a0a1a777c52ca7fe2c62c90ff7","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sys/gnu/vfs/ext2fs: Remove unused ioctl call and variables\n\nIn addition to 30b14d35.\n(Also see r98542 and r104697 of FreeBSD)","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/3aef25e813fe97a0a1a777c52ca7fe2c62c90ff7"},{"sha":"b45803e36700b8126fbc3863d4292d3fccaa7203","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"hammer: Conform to style(9)\n\nAlso\n* Remove header includes that are already included by\n  common hammer headers (of either userspace or kernel).\n* Add \"#include <sys/vnode.h>\" to sys/vfs/fifofs/fifo.h.","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/b45803e36700b8126fbc3863d4292d3fccaa7203"},{"sha":"653fa4cdc01b9549ebb3e609c02eeeb9c363a1d7","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"hammer: Cleanups\n\nUnfold lines (that aren't intentionally separated\ninto different lines) that fit in 80 chars.\n\nFold lines that are way too long.","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/653fa4cdc01b9549ebb3e609c02eeeb9c363a1d7"},{"sha":"2bc4c6de1caac7573288103af865261c71294010","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sbin/hammer: Fix hammer show output format\n\nSync with formats of other fields.","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/2bc4c6de1caac7573288103af865261c71294010"},{"sha":"deabdbfb46b4b6d2e766d83ec8fb97958fedc38b","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sys/vfs/hammer: Remove duplicated vfs code\n\nMuch of the code in sys/vfs/hammer/hammer_volume.c is taken\nfrom the existing code, and some of them could be integrated\ninto mainstream hammer code. This commit does that without\nmessing up interface or making functional changes.\n\nThis greatly reduces and simplifies code, and also gets rid\nof extra (and unnecessary) vfs open/close operations that\nexisted only to initialize or erase volume header while in\nkernel space on ioctl.","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/deabdbfb46b4b6d2e766d83ec8fb97958fedc38b"},{"sha":"cb9ee493e8270dfbcd186292436b4f45c1a3a5e4","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sys/vfs/hammer: Cleanup volume-add|del ioctl [1/3]\n\nThis commit is 1/3 of a series of commits that extract\ncommon procedures on updating volumes header into a function.\n\nReordering hammer_format_freemap() and updating volume count\ndoesn't affect behavior of volume-add since it's independent\nof each other. Also note that these all must succeed anyway\nas assertions show.","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/cb9ee493e8270dfbcd186292436b4f45c1a3a5e4"},{"sha":"4a8dc36278d79043abd59dfdc04ad37031c9dd4c","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sys/vfs/hammer: Cleanup volume-add|del ioctl [2/3]\n\nThis commit is 2/3 of a series of commits that extract\ncommon procedures on updating volumes header into a function.\n\nChanging bigblock_stat fields to signed is ok (or even better)\nsince the original ondisk fields are int64_t.","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/4a8dc36278d79043abd59dfdc04ad37031c9dd4c"},{"sha":"894b86ecaff811990d1438b86c9bf2b871b9043e","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sys/vfs/hammer: Cleanup volume-add|del ioctl [3/3]\n\nThis commit is 3/3 of a series of commits that extract\ncommon procedures on updating volumes header into a function.\n\nAdd hammer_update_volumes_header().","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/894b86ecaff811990d1438b86c9bf2b871b9043e"},{"sha":"cc51e58d40449767d7f787d2bbc5d9a75450f5d8","author":{"email":"b3dbb467a2790817398bcb77cb340b1133225387@gmail.com","name":"Tomohiro Kusumi"},"message":"sys/vfs/hammer: Cleanups\n\nRemaining minor ones.","distinct":false,"url":"https://api.github.com/repos/davshao/dragonfly_drm4/commits/cc51e58d40449767d7f787d2bbc5d9a75450f5d8"}]}