History log of /dragonfly/sbin/hammer/cmd_info.c (Results 1 – 25 of 33)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.2.1, v6.2.0, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2, v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3, v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2, v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1, v5.2.2, v5.2.1, v5.2.0, v5.3.0, v5.2.0rc, v5.0.2, v5.0.1, v5.0.0, v5.0.0rc2, v5.1.0, v5.0.0rc1
# 41ae0862 23-Sep-2017 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Cleanup header includes


# 3cd578ed 21-Sep-2017 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Add uuid.c

Add a simple wrapper over uuid functions for better portability,
similar to sys/vfs/hammer/hammer_crc.h (which helped implement
version 7 CRC).

No functional changes.


Revision tags: v4.8.1
# 005a4da7 14-Apr-2017 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/*hammer: Use consistent static/inline/returntype format for functions

Change them to HAMMER2 style which has much more stable code style
than HAMMER1. HAMMER1 is basically a mix of every possib

sbin/*hammer: Use consistent static/inline/returntype format for functions

Change them to HAMMER2 style which has much more stable code style
than HAMMER1. HAMMER1 is basically a mix of every possible pattern
(even in the code originally written only by dillon@).

show more ...


# 052fd72b 11-Apr-2017 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Add /* not reached */

that were originally missing.
Recommended by dillon@.
No diff in sbin/hammer binary when assert(3) is disabled.


# f91ad52a 09-Apr-2017 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Make info command print a proper error message

Printing a function name of some library makes no sense.


# babddd74 09-Apr-2017 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Make info command properly handle non HAMMER path

This shouldn't be needed if i/f of libhammer were carefully designed,
but this seems to be the only guaranteed way to detect non HAMMER

sbin/hammer: Make info command properly handle non HAMMER path

This shouldn't be needed if i/f of libhammer were carefully designed,
but this seems to be the only guaranteed way to detect non HAMMER path,
and print a proper error message that makes sense for UFS, etc.

-- before this commit
# hammer info /boot
hammer: libhammer_get_fsinfo <--- ???

-- with this commit
# hammer info /boot
hammer: /boot is probably not a HAMMER filesystem: Inappropriate ioctl for device

show more ...


Revision tags: v4.8.0, v4.6.2, v4.9.0, v4.8.0rc
# a5ff7917 16-Dec-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Don't hardcode 0 for root PFS

HAMMER code doesn't hardcode 0 for root PFS
(e.g. see sbin/newfs_hammer, it could be !=0 if one wants to do so).

Fix the existing error messages using har

sbin/hammer: Don't hardcode 0 for root PFS

HAMMER code doesn't hardcode 0 for root PFS
(e.g. see sbin/newfs_hammer, it could be !=0 if one wants to do so).

Fix the existing error messages using hardcoded 0.
Also add "(root PFS)" for PFS#0 in hammer info command.

show more ...


# 02318f07 15-Dec-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Change fprintf/exit to err variants [2/2]

Change
fprintf(stderr, ...); exit(1);
and
perror(...); exit(1);
to
err(1, ...) or errx(1, ...);
where possible for consistency.

This commit is

sbin/hammer: Change fprintf/exit to err variants [2/2]

Change
fprintf(stderr, ...); exit(1);
and
perror(...); exit(1);
to
err(1, ...) or errx(1, ...);
where possible for consistency.

This commit is just conversion to err(3) variants.
Messages themselves are not changed, except for removing
strerror(errno) for err(3), and removing trailing \n,
though err variants add program name in the messages.

err(3) and variants are non standard BSD functions, but HAMMER
userspace has been using BSD stuff aside from the existing
err/errx. Also note that err(3) is available in Linux as well.

show more ...


Revision tags: v4.6.1
# d6c59c72 23-Aug-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Don't print mountpoint of PFS

/sbin/hammer should not care if PFS are null mounted or where PFS are
mounted. It has nothing to do with the filesystem itself. PFS is just
a pointer to ju

sbin/hammer: Don't print mountpoint of PFS

/sbin/hammer should not care if PFS are null mounted or where PFS are
mounted. It has nothing to do with the filesystem itself. PFS is just
a pointer to jump into a subset of HAMMER's B-Tree (clustered by
localization parameter). Just because DragonFly's installer used to
use PFS (not anymore) and null mount by default doesn't mean /sbin
/hammer needs to provide null mount info.

If someone does mount PFS to somewhere and want to know where PFS are
mounted, one needs to just type mount. In fact this is much better
than getting mountpoints info via hammer info command because mount(8)
doesn't use hammer's ioctl which may cause B-Tree lookup, but instead
retrieves mountpoints directly from vfs.

Also note that printing such info gives users wrong assumption that
PFS in HAMMER is something equivalent of ZFS (created out of storage
zpool) which is not true. As mentioned above, PFS is just a pointer to
a subset of a single HAMMER filesystem. These are not independent fs.

Also note that hammer info still has bugs due to bugs from libhammer
and its attached ioctl as mentioned in e0f42079, including things under
investigation now. Whatever it is, hammer info needs to be rewritten
(as a different command like hammer fsinfo) in short and straight
forward code like other commands, without unnecessary abstraction.
I've been fixing and adding missing stuff to this hammer info command,
however hammer info is basically going nowhere because this command is
too tightly attached to libhammer.

show more ...


# ea458aa6 12-Aug-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Don't include libhammer.h unconditionally

Though /sbin/hammer links to libhammer, only two commands use it.

Move SNAPSHOTS_BASE from cmd_cleanup.c to hammer.h.
This macro is defined in

sbin/hammer: Don't include libhammer.h unconditionally

Though /sbin/hammer links to libhammer, only two commands use it.

Move SNAPSHOTS_BASE from cmd_cleanup.c to hammer.h.
This macro is defined in both sbin/hammer and libhammer.
It apparently doesn't need to ask an external library for snapshot location.

# grep libhammer sbin/hammer sbin/newfs_hammer -rIl
sbin/hammer/cmd_info.c
sbin/hammer/cmd_snapshot.c
sbin/hammer/hammer.h

show more ...


Revision tags: v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0
# 0ba55d9a 18-Apr-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Use printf() instead of fprintf(stdout)

Follow sbin/hammer's coding style (as well as C in general).

# grep "fprintf(stdout" sbin/hammer -riI
sbin/hammer/cmd_info.c:

sbin/hammer: Use printf() instead of fprintf(stdout)

Follow sbin/hammer's coding style (as well as C in general).

# grep "fprintf(stdout" sbin/hammer -riI
sbin/hammer/cmd_info.c: fprintf(stdout, "\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "No mounted HAMMER filesystems found\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "No mounted filesystems found\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "Volume identification\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "\tLabel %s\n", fip->vol_name);
sbin/hammer/cmd_info.c: fprintf(stdout, "\tNo. Volumes %d\n", fip->nvolumes);
sbin/hammer/cmd_info.c: fprintf(stdout, "\tHAMMER Volumes ");
sbin/hammer/cmd_info.c: fprintf(stdout, "\tRoot Volume %s\n", rootvol);
sbin/hammer/cmd_info.c: fprintf(stdout, "\tFSID %s\n", fsid);
sbin/hammer/cmd_info.c: fprintf(stdout, "\tHAMMER Version %d\n", fip->version);
sbin/hammer/cmd_info.c: fprintf(stdout, "Big-block information\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "\tTotal %10jd\n", (intmax_t)fip->bigblocks);
sbin/hammer/cmd_info.c: fprintf(stdout, "\tUsed %10jd (%.2lf%%)\n"
sbin/hammer/cmd_info.c: fprintf(stdout, "Space information\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "\tNo. Inodes %10jd\n", (intmax_t)fip->inodes);
sbin/hammer/cmd_info.c: fprintf(stdout, "\tTotal size %6s (%jd bytes)\n",
sbin/hammer/cmd_info.c: fprintf(stdout, "\tUsed %6s (%.2lf%%)\n", buf,
sbin/hammer/cmd_info.c: fprintf(stdout, "\tReserved %6s (%.2lf%%)\n", buf,
sbin/hammer/cmd_info.c: fprintf(stdout, "\tFree %6s (%.2lf%%)\n", buf,
sbin/hammer/cmd_info.c: fprintf(stdout, "PFS information\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "\tPFS ID Mode Snaps Mounted on\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "\t%6d %-6s",
sbin/hammer/cmd_info.c: fprintf(stdout, " %6s ", (pi->head.error && pi->snapcount == 0) ? "-" : buf);
sbin/hammer/cmd_info.c: fprintf(stdout, "%s", pi->mountedon);
sbin/hammer/cmd_info.c: fprintf(stdout, "not mounted");
sbin/hammer/cmd_info.c: fprintf(stdout, "\n");

show more ...


# c1ac632a 18-Apr-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Add no hammer found message if not mounted

The local variable 'first' being non-zero after the loop means
none of them were hammer.


# 99df3406 09-Apr-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Make hammer info print volumes

in blkdevs format, in addition to 56c2f4d6.
This code is exactly what hammer volume-blkdevs does.

# hammer info /HAMMER
Volume identification

sbin/hammer: Make hammer info print volumes

in blkdevs format, in addition to 56c2f4d6.
This code is exactly what hammer volume-blkdevs does.

# hammer info /HAMMER
Volume identification
Label TEST
No. Volumes 3
HAMMER Volumes /dev/da1:/dev/da2:/dev/da3
Root Volume /dev/da1
...

show more ...


Revision tags: v4.4.3
# 56c2f4d6 02-Apr-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Make hammer commands print root volume path

Base on the change made by the previous commit, this commit adds
the root volume path information (not root volume#) to hammer info
and hamme

sbin/hammer: Make hammer commands print root volume path

Base on the change made by the previous commit, this commit adds
the root volume path information (not root volume#) to hammer info
and hammer volume-list commands. hammer volume-list shows the path
only on -v. This enables users to explicitly know the root volume.

[A] The existing /sbin/hammer
# hammer -v volume-list /HAMMER
/dev/da1
/dev/da2
/dev/da3
# hammer info /HAMMER | grep Root
Root Volume 0

[B] With this commit
# ./hammer -v volume-list /HAMMER
0 /dev/da1 (Root Volume)
1 /dev/da2
2 /dev/da3
# hammer info /HAMMER | grep Root
Root Volume /dev/da1

show more ...


# e6fca9a0 31-Mar-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Make hammer info print \n between filesystems

(not PFSs, but different HAMMER mounts)


# 7aee7a8b 31-Mar-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Make hammer info print rootvol

The existence of "root volume" in HAMMER is mentioned in
error messages and dmesg as well as hammer(8) manpage,
but the problem is that no command really

sbin/hammer: Make hammer info print rootvol

The existence of "root volume" in HAMMER is mentioned in
error messages and dmesg as well as hammer(8) manpage,
but the problem is that no command really tells you which
one is the root volume. This is too obvious if you have
looked at the source, but no idea if otherwise.

Currently the only one explicitly tells you seems to be
a printf in newfs_hammer added by dae8f186 in 2015.

This commit adds hammer info a printf for root volume #,
which is still not clear enough since it's just a number,
but not a block device path.

show more ...


Revision tags: v4.4.2, v4.4.1, v4.4.0, v4.5.0, v4.4.0rc, v4.2.4, v4.3.1, v4.2.3
# d165c90a 02-Jul-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/vfs/hammer: Change "big block" to "big-block"

- This word refers to 8MB chunk in hammer's blockmap layers,
not literally "big" "block".

- Changes are mostly comments and some in printf and ha

sys/vfs/hammer: Change "big block" to "big-block"

- This word refers to 8MB chunk in hammer's blockmap layers,
not literally "big" "block".

- Changes are mostly comments and some in printf and hammer(8).

- The official design document as well as much of the existing
code (excluding variable and macro names) use "big-block".
https://www.dragonflybsd.org/hammer/hammer.pdf

- Also see e04ee2de.

show more ...


Revision tags: v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc
# 14df6a3d 26-Mar-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Remove duplicated header include

- <libhammer.h> is included by "hammer.h"


Revision tags: v4.0.5, v4.0.4
# a77d0377 10-Feb-2015 Antonio Huete Jimenez <tuxillo@quantumachine.net>

libhammer - Preparation for snapshot handling & fixes

Trivial changes:
- Function renaming to actually match what they are
describing.
- Clearer variable naming.

Additions:
- Structures to ho

libhammer - Preparation for snapshot handling & fixes

Trivial changes:
- Function renaming to actually match what they are
describing.
- Clearer variable naming.

Additions:
- Structures to hold snapshot data.
- Functions to retrieve snapshots from metadata for PFSes.
- A file for version compatibility functions.
- A function to return the canonical access path of a
PFS which is suitable for opening.
- Wrappers to operate per PFS snapshot list.

Changes & fixes:
- Use the new functions to gather all snaps of a PFS.
- Adapt hammer program for the changes.
- Check before free'ing in libhammer_free_fsinfo()
- Display the number of snapshots for unmounted PFSes.

Still missing:
- Manpages changes.

show more ...


# e04ee2de 31-Jan-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

hammer: fix terminology of "large block"

This cleanup patch changes terminology "large block" to "big block".

- Both "large block" and "big block" are widely used in hammer source from
kernel to us

hammer: fix terminology of "large block"

This cleanup patch changes terminology "large block" to "big block".

- Both "large block" and "big block" are widely used in hammer source from
kernel to userspace, however these two refer to the same data structure which
is a 8MB sized chunk within low level blockmapped storage layer.

- The original design document https://www.dragonflybsd.org/hammer/hammer.pdf
uses big block for this data structure. Having two expressions in its
implementation is confusing and makes grep difficult.

Closes: #2782

show more ...


Revision tags: v4.0.3, v4.0.2, v4.0.1, v4.0.0, v4.0.0rc3, v4.0.0rc2, v4.0.0rc, v4.1.0, v3.8.2, v3.8.1, v3.6.3, v3.8.0, v3.8.0rc2, v3.9.0, v3.8.0rc, v3.6.2, v3.6.1, v3.6.0, v3.7.1, v3.6.0rc, v3.7.0
# 61630cfc 07-Sep-2013 Antonio Huete Jimenez <tuxillo@quantumachine.net>

hammer(8) - Allow specifying paths to 'info' directive.


Revision tags: v3.4.3, v3.4.2, v3.4.0, v3.4.1, v3.4.0rc, v3.5.0, v3.2.2, v3.2.1, v3.2.0, v3.3.0
# 50a61867 01-Oct-2012 John Marino <draco@marino.st>

gcc47 build fixes: Unused-but-set-variable + more warnings

The following programs fail to build with gcc47 due to the new
unused-but-set-variable warning. They've been fixed in various ways.
The on

gcc47 build fixes: Unused-but-set-variable + more warnings

The following programs fail to build with gcc47 due to the new
unused-but-set-variable warning. They've been fixed in various ways.
The ones set with WARNS=3 suppress cast-qual warning
There is a single enum-compare error too.

This effort is not complete.

bin/csh pass -Wno-unused-but-set-variable
bin/mined source file modified
bin/sh set WARNS=3
crypto/openssh source file modified (2)
gnu/lib/libdialog source file modified
gnu/usr.bin/gdb/kgdb source file modified
gnu/usr.bin/rcs source file modified
lib/libalias source file modified
lib/libdevstat source file modified
lib/libdm set WARNS=3
lib/libevtr source file modified
lib/libldns pass -Wno-unused-but-set-variable
lib/libncp source file modified
lib/libpam set WARNS=3
lib/libsmdb pass -Wno-unused-but-set-variable
lib/libstand source file modified (4)
lib/libtcplay source file modified
lib/libthread_xu source file modified (2)
libexec/rshd source file modified
libexec/telnetd source file modified
libexec/ypxfr pass -Wno-enum-compare
sbin/atm/fore_dnld source file modified
sbin/atm/ilmid source file modified
sbin/atm/camcontrol source file modifief (2)
sbin/ccdconfig source file modified
sbin/cryptdisks source file modified
sbin/ffsinfo source file modified
sbin/fsirand source file modified
sbin/growfs source file modified
sbin/hammer source file modified
sbin/ldconfig source file modified (real bug here?)
sbin/mount source file modified
sbin/mount_ufs source file modified
sbin/mount_extfs source file modified
sbin/mountd source file modified
sbin/natd source file modified
sbin/newfs source file modified
sbin/ping6 set WARNS=3, source modified
sbin/rcorder source file modified
sbin/reboot source file modified (real bug here?)
sbin/udevd source file modified
sbin/usched source file modified
sbin/vinum source file modified
sys/boot/common source file modified
sys/boot/pc32/loader source file modified
usr.bin/brandelf source file modified
usr.bin/bzip2 pass -Wno-unused-but-set-variable
usr.bin/dfregress source file modified
usr.bin/ee source file modified
usr.bin/less pass -Wno-unused-but-set-variable

show more ...


Revision tags: v3.0.3, v3.0.2, v3.0.1, v3.1.0, v3.0.0
# 86d7f5d3 26-Nov-2011 John Marino <draco@marino.st>

Initial import of binutils 2.22 on the new vendor branch

Future versions of binutils will also reside on this branch rather
than continuing to create new binutils branches for each new version.


# 4f09feab 05-Nov-2011 Antonio Huete Jimenez <tuxillo@quantumachine.net>

hammer - Migration to libhammer (step 1/many)

- Start using libhammer
- Migrate info directive


Revision tags: v2.12.0, v2.13.0
# 181b7084 30-Jun-2011 Antonio Huete Jimenez <tuxillo@quantumachine.net>

hammer(8) - Fix snapshot count in info directive.

- We were wrongly using the HAMMER filesystem fd instead of a per-PFS one.
- Adapt the snapshot count in the case of error


12