My earlier report made me question my fstab(5) contents because
filesystems mounted with "softdep" would not have the SOFTDEP flag printed in ddb(4)'s `show all mounts' output. Turns out ddb simply ignores the bit, but I'd argue using softdep or not can be important information, so add it accordingly. Here's a test snapshot VM with a single filesystem using softdep and showing mounts in the debugger: test# mount /dev/sd0a on / type ffs (local, wxallowed, softdep) test# sysctl ddb.trigger=1 Stopped at db_enter+0x10: popq %rbp ddb> show all mounts mountpoint 0xffff8000000d1000 flags 4205800<WXALLOWED,LOCAL,ROOTFS> vnodecovered 0x0 syncer 0xfffffd801eef1d38 data 0xffff800000087c00 vfsconf: ops 0xffffffff8202a960 name "ffs" num 1 ref 1 flags 0x201000 statvfs cache: bsize 800 iosize 4000 blocks 497095 free 84822 avail 59968 files 129598 ffiles 115439 favail 115439 f_fsidx {0x400, 0xe9b63a57} owner 0 ctime 0x606a31a6 syncwrites 58 asyncwrites = 1436 syncreads 22635 asyncreads = 0 fstype "ffs" mnton "/" mntfrom "/dev/sd0a" mntspec "5778912438e27f1e.a" locked vnodes: ddb> continue ddb.trigger: 0 -> 1 Same VM/filesystem with patched kernel: ddb> show all mounts mountpoint 0xffff8000000c8000 flags 4205800<WXALLOWED,LOCAL,ROOTFS,SOFTDEP> vnodecovered 0x0 syncer 0xfffffd801f247a98 data 0xffff800000087800 vfsconf: ops 0xffffffff812ec530 name "ffs" num 1 ref 1 flags 0x201000 statvfs cache: bsize 800 iosize 4000 blocks 497095 free 84770 avail 59916 files 129598 ffiles 115439 favail 115439 f_fsidx {0x400, 0xe9b63a57} owner 0 ctime 0x606a341c syncwrites 59 asyncwrites = 179 syncreads 13048 asyncreads = 0 fstype "ffs" mnton "/" mntfrom "/dev/sd0a" mntspec "5778912438e27f1e.a" locked vnodes: From CVS history this looks like mickey simply overlooked SOFTDEP when adding the "flags ..." output with sys/sys/mount.h revision 1.75 sys/kern/vfs_subr.c revision 1.133 date: 2006/07/11 21:17:58; author: mickey; state: Exp; lines: +126 -1; add mount/vnode/buf and softdep printing commands; tested on a few archs and will make pedro happy too (; Use tabs not spaces while here (nicely pulling the relevant bits into diff context). Feedback? OK? Index: sys/mount.h =================================================================== RCS file: /cvs/src/sys/sys/mount.h,v retrieving revision 1.147 diff -u -p -r1.147 mount.h --- sys/mount.h 18 Jan 2020 08:40:19 -0000 1.147 +++ sys/mount.h 4 Apr 2021 21:28:33 -0000 @@ -387,7 +387,7 @@ struct mount { #define MNT_BITS \ "\20\001RDONLY\002SYNCHRONOUS\003NOEXEC\004NOSUID\005NODEV\006NOPERM" \ "\007ASYNC\010EXRDONLY\011EXPORTED\012DEFEXPORTED\013EXPORTANON" \ - "\014WXALLOWED\015LOCAL\016QUOTA\017ROOTFS\020NOATIME" + "\014WXALLOWED\015LOCAL\016QUOTA\017ROOTFS\020NOATIME\033SOFTDEP" /* * filesystem control flags. @@ -399,7 +399,7 @@ struct mount { #define MNT_STALLED 0x00100000 /* filesystem stalled */ #define MNT_SWAPPABLE 0x00200000 /* filesystem can be used for swap */ #define MNT_WANTRDWR 0x02000000 /* want upgrade to read/write */ -#define MNT_SOFTDEP 0x04000000 /* soft dependencies being done */ +#define MNT_SOFTDEP 0x04000000 /* soft dependencies being done */ #define MNT_DOOMED 0x08000000 /* device behind filesystem is gone */ #ifdef _KERNEL |
On Sun, Apr 04, 2021 at 11:56:57PM +0200, Klemens Nanni wrote:
> ddb> show all mounts > mountpoint 0xffff8000000c8000 > flags 4205800<WXALLOWED,LOCAL,ROOTFS,SOFTDEP> > vnodecovered 0x0 syncer 0xfffffd801f247a98 data 0xffff800000087800 > vfsconf: ops 0xffffffff812ec530 name "ffs" num 1 ref 1 flags 0x201000 > statvfs cache: bsize 800 iosize 4000 > blocks 497095 free 84770 avail 59916 > files 129598 ffiles 115439 favail 115439 > f_fsidx {0x400, 0xe9b63a57} owner 0 ctime 0x606a341c > syncwrites 59 asyncwrites = 179 > syncreads 13048 asyncreads = 0 > fstype "ffs" mnton "/" mntfrom "/dev/sd0a" mntspec "5778912438e27f1e.a" > locked vnodes: > > From CVS history this looks like mickey simply overlooked SOFTDEP when > adding the "flags ..." output with > > sys/sys/mount.h revision 1.75 > sys/kern/vfs_subr.c revision 1.133 > date: 2006/07/11 21:17:58; author: mickey; state: Exp; lines: +126 -1; > add mount/vnode/buf and softdep printing commands; tested on a few archs and will make pedro happy too (; > > > Use tabs not spaces while here (nicely pulling the relevant bits into > diff context). > > Feedback? OK? Shouldn't all the MNT_* bits be listed in the decoding directive? The directive is still incomplete. > Index: sys/mount.h > =================================================================== > RCS file: /cvs/src/sys/sys/mount.h,v > retrieving revision 1.147 > diff -u -p -r1.147 mount.h > --- sys/mount.h 18 Jan 2020 08:40:19 -0000 1.147 > +++ sys/mount.h 4 Apr 2021 21:28:33 -0000 > @@ -387,7 +387,7 @@ struct mount { > #define MNT_BITS \ > "\20\001RDONLY\002SYNCHRONOUS\003NOEXEC\004NOSUID\005NODEV\006NOPERM" \ > "\007ASYNC\010EXRDONLY\011EXPORTED\012DEFEXPORTED\013EXPORTANON" \ > - "\014WXALLOWED\015LOCAL\016QUOTA\017ROOTFS\020NOATIME" > + "\014WXALLOWED\015LOCAL\016QUOTA\017ROOTFS\020NOATIME\033SOFTDEP" > > /* > * filesystem control flags. > @@ -399,7 +399,7 @@ struct mount { > #define MNT_STALLED 0x00100000 /* filesystem stalled */ > #define MNT_SWAPPABLE 0x00200000 /* filesystem can be used for swap */ > #define MNT_WANTRDWR 0x02000000 /* want upgrade to read/write */ > -#define MNT_SOFTDEP 0x04000000 /* soft dependencies being done */ > +#define MNT_SOFTDEP 0x04000000 /* soft dependencies being done */ > #define MNT_DOOMED 0x08000000 /* device behind filesystem is gone */ > > #ifdef _KERNEL > |
On Mon, Apr 05, 2021 at 07:47:40AM +0000, Visa Hankala wrote:
> On Sun, Apr 04, 2021 at 11:56:57PM +0200, Klemens Nanni wrote: > > ddb> show all mounts > > mountpoint 0xffff8000000c8000 > > flags 4205800<WXALLOWED,LOCAL,ROOTFS,SOFTDEP> > > vnodecovered 0x0 syncer 0xfffffd801f247a98 data 0xffff800000087800 > > vfsconf: ops 0xffffffff812ec530 name "ffs" num 1 ref 1 flags 0x201000 > > statvfs cache: bsize 800 iosize 4000 > > blocks 497095 free 84770 avail 59916 > > files 129598 ffiles 115439 favail 115439 > > f_fsidx {0x400, 0xe9b63a57} owner 0 ctime 0x606a341c > > syncwrites 59 asyncwrites = 179 > > syncreads 13048 asyncreads = 0 > > fstype "ffs" mnton "/" mntfrom "/dev/sd0a" mntspec "5778912438e27f1e.a" > > locked vnodes: > > > > From CVS history this looks like mickey simply overlooked SOFTDEP when > > adding the "flags ..." output with > > > > sys/sys/mount.h revision 1.75 > > sys/kern/vfs_subr.c revision 1.133 > > date: 2006/07/11 21:17:58; author: mickey; state: Exp; lines: +126 -1; > > add mount/vnode/buf and softdep printing commands; tested on a few archs and will make pedro happy too (; > > > > > > Use tabs not spaces while here (nicely pulling the relevant bits into > > diff context). > > > > Feedback? OK? > > Shouldn't all the MNT_* bits be listed in the decoding directive? > The directive is still incomplete. Feedback? OK? Index: mount.h =================================================================== RCS file: /cvs/src/sys/sys/mount.h,v retrieving revision 1.147 diff -u -p -r1.147 mount.h --- mount.h 18 Jan 2020 08:40:19 -0000 1.147 +++ mount.h 5 Apr 2021 15:53:20 -0000 @@ -387,7 +387,9 @@ struct mount { #define MNT_BITS \ "\20\001RDONLY\002SYNCHRONOUS\003NOEXEC\004NOSUID\005NODEV\006NOPERM" \ "\007ASYNC\010EXRDONLY\011EXPORTED\012DEFEXPORTED\013EXPORTANON" \ - "\014WXALLOWED\015LOCAL\016QUOTA\017ROOTFS\020NOATIME" + "\014WXALLOWED\015LOCAL\016QUOTA\017ROOTFS\020NOATIME\021UPDATE" \ + "\022DELEXPORT\023RELOAD\024FORCE\025STALLED\026SWAPPABLE\032WANTRDWR" \ + "\033SOFTDEP\034DOOMED" /* * filesystem control flags. |
On Mon, Apr 05, 2021 at 06:01:42PM +0200, Klemens Nanni wrote:
> On Mon, Apr 05, 2021 at 07:47:40AM +0000, Visa Hankala wrote: > > On Sun, Apr 04, 2021 at 11:56:57PM +0200, Klemens Nanni wrote: > > > ddb> show all mounts > > > mountpoint 0xffff8000000c8000 > > > flags 4205800<WXALLOWED,LOCAL,ROOTFS,SOFTDEP> > > > vnodecovered 0x0 syncer 0xfffffd801f247a98 data 0xffff800000087800 > > > vfsconf: ops 0xffffffff812ec530 name "ffs" num 1 ref 1 flags 0x201000 > > > statvfs cache: bsize 800 iosize 4000 > > > blocks 497095 free 84770 avail 59916 > > > files 129598 ffiles 115439 favail 115439 > > > f_fsidx {0x400, 0xe9b63a57} owner 0 ctime 0x606a341c > > > syncwrites 59 asyncwrites = 179 > > > syncreads 13048 asyncreads = 0 > > > fstype "ffs" mnton "/" mntfrom "/dev/sd0a" mntspec "5778912438e27f1e.a" > > > locked vnodes: > > > > > > From CVS history this looks like mickey simply overlooked SOFTDEP when > > > adding the "flags ..." output with > > > > > > sys/sys/mount.h revision 1.75 > > > sys/kern/vfs_subr.c revision 1.133 > > > date: 2006/07/11 21:17:58; author: mickey; state: Exp; lines: +126 -1; > > > add mount/vnode/buf and softdep printing commands; tested on a few archs and will make pedro happy too (; > > > > > > > > > Use tabs not spaces while here (nicely pulling the relevant bits into > > > diff context). > > > > > > Feedback? OK? > > > > Shouldn't all the MNT_* bits be listed in the decoding directive? > > The directive is still incomplete. > Here's adding all bits. OK visa@ > Index: mount.h > =================================================================== > RCS file: /cvs/src/sys/sys/mount.h,v > retrieving revision 1.147 > diff -u -p -r1.147 mount.h > --- mount.h 18 Jan 2020 08:40:19 -0000 1.147 > +++ mount.h 5 Apr 2021 15:53:20 -0000 > @@ -387,7 +387,9 @@ struct mount { > #define MNT_BITS \ > "\20\001RDONLY\002SYNCHRONOUS\003NOEXEC\004NOSUID\005NODEV\006NOPERM" \ > "\007ASYNC\010EXRDONLY\011EXPORTED\012DEFEXPORTED\013EXPORTANON" \ > - "\014WXALLOWED\015LOCAL\016QUOTA\017ROOTFS\020NOATIME" > + "\014WXALLOWED\015LOCAL\016QUOTA\017ROOTFS\020NOATIME\021UPDATE" \ > + "\022DELEXPORT\023RELOAD\024FORCE\025STALLED\026SWAPPABLE\032WANTRDWR" \ > + "\033SOFTDEP\034DOOMED" > > /* > * filesystem control flags. > |
Free forum by Nabble | Edit this page |