Karel Zak [Tue, 7 Jun 2022 07:11:56 +0000 (09:11 +0200)]
lslogins: improve prefixes interpretation
It seems that for example 'passwd --lock' uses two exclamation marks
in password field. It seems better to assume arbitrary number of '!'
and '*' prefixes.
The patch also makes description of the PWD-EMPTY output field more
explicit.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2093166 Signed-off-by: Karel Zak <kzak@redhat.com>
zhenwei pi [Fri, 3 Jun 2022 12:24:01 +0000 (20:24 +0800)]
lsblk: introduce 'MQ' column
Typically a modern block device supports mutil queues feature, count
queues by walking '$sysfs/mq' directory. If no '$sysfs/mq' exists, it
is a legacy single queue.
~# lsblk --nvme -o NAME,TYPE,MODEL,TRAN,RQ-SIZE,MQ
NAME TYPE MODEL TRAN RQ-SIZE MQ
nvme0n1 disk INTEL SSDPF2KX038TZ nvme 1023 135
nvme3n1 disk INTEL SSDPE2KX020T8 nvme 1023 128
nvme1n1 disk SAMSUNG MZQL23T8HCLS-00A07 nvme 1023 129
nvme2n2 disk RP2A03T8RK004LX nvme 1023 64
nvme2n3 disk RP2A03T8RK004LX nvme 1023 64
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
libblkid: add FSSIZE implementation for btrfs and ext
The implementation does not take into account complete metadata
overhead. The BTRFS one doesn't consider redundant data in RAID
configuration. The ext one doesn't take into account file system
overhead.
The name BLOCK_SIZE is unfortunate. This tag doesn't represent
commonly used file system block size but minimal block size
accessible by file system (sector size).
The FSBLOCKSIZE tag exposes file system block size in contrast to
the BLOCK_SIZE (unfortunate name) which returns minimal accessible
block size (sector size).
Hideki EIRAKU [Wed, 25 May 2022 03:23:16 +0000 (12:23 +0900)]
loopdev: set block_size when using LOOP_CONFIGURE
LOOP_CONFIGURE ioctl was introduced by commit d5fd456c88aba4fcf77d35fe38024a8d5c814686. Since the previous
implementation set partscan flag but did not set block_size with the
LOOP_CONFIGURE ioctl, an issue fixed by commit 422f0e9f206a145c59a71333dad20d38cbbfc0c4 was reappeared. Setting
block_size in the LOOP_CONFIGURE ioctl parameter fixes the issue.
Karel Zak [Thu, 26 May 2022 07:49:29 +0000 (09:49 +0200)]
Merge branch 'taskset-mistake' of https://github.com/csbo98/util-linux
* 'taskset-mistake' of https://github.com/csbo98/util-linux:
Maybe there is a little mistake in do_taskset() function in taskset.c. In the first call of sched_getaffinity(), if the call is failed we should use err_affinity(ts->pid, 0) other than err_affinity(ts->pid, 1).
csbo98 [Sun, 22 May 2022 06:47:13 +0000 (14:47 +0800)]
Maybe there is a little mistake in do_taskset() function in taskset.c.
In the first call of sched_getaffinity(), if the call is failed we should
use err_affinity(ts->pid, 0) other than err_affinity(ts->pid, 1).
pipesz is a utility to examine and adjust the size of pipe buffers.
It uses fctnl F_GETPIPE_SZ and F_SETPIPE_SZ to examine and resize
these buffers. This functionality is unique to Linux and was added in
version 2.6.35. Minor bugfixes were made in 4.9, but these do not
obviate the use of pipesz prior to that release.
Signed-off-by: Nathan Sharp <nwsharp@live.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Scott Shambarger [Thu, 12 May 2022 23:27:26 +0000 (16:27 -0700)]
fstrim: Remove all skipped entries before de-duplication
When processing fstab entries, de-duplication is performed based on the
source before all tests on the target have been checked, resulting in
some entries being skipped when a removed duplicate with a different
target would not have been.
The fix is to move all the target checks before the source
de-duplication.
Addresses: #1686 Signed-off-by: Scott Shambarger <devel@shambarger.net>
Karel Zak [Wed, 11 May 2022 08:21:34 +0000 (10:21 +0200)]
Merge branch 'hardlink-docs' of https://github.com/ferdnyc/util-linux
* 'hardlink-docs' of https://github.com/ferdnyc/util-linux:
hardlink: Fix man page docs for '-v/--verbose'
hardlink: Wrap -b to 80 cols, in --help
hardlink: Move reflink options in manpage
hardlink: Move -c option in --help
hardlink: Document '-c' option in manpage
The documentation for the --reflink and --skip-reflink options
felt sort of shoe-horned into the rest of the options, in the
man page. Reorder to match where they appear in the --help output.
Karel Zak [Thu, 5 May 2022 09:12:23 +0000 (11:12 +0200)]
Merge branch 'meson-fixups' of https://github.com/eli-schwartz/util-linux
* 'meson-fixups' of https://github.com/eli-schwartz/util-linux:
meson: fix error in processing version for pc files
meson: get the project version from the version-gen script
Put BLOCK_SIZE, FSSIZE and FSLASTBLOCK tags under one FSINFO flag.
These, and probably future ones, are read directly from the
superblock (with minor post-processing). These properties are
combined under one flag to escape adding a flag per superblock
member.
Karel Zak [Wed, 4 May 2022 09:22:58 +0000 (11:22 +0200)]
Merge branch 'fix-move-with-sub-mounted-trees' of https://github.com/fbuihuu/util-linux
* 'fix-move-with-sub-mounted-trees' of https://github.com/fbuihuu/util-linux:
libmount: when moving a mount point, all sub mount entries in utab should also be updated
Karel Zak [Mon, 2 May 2022 13:45:30 +0000 (15:45 +0200)]
Merge branch 'add/fslastblock' of https://github.com/alberand/util-linux
* 'add/fslastblock' of https://github.com/alberand/util-linux:
blkid: add tests for FSLASTBLOCK tag
blkid: add image for btrfs testing
libblkid: add FSLASTBLOCK implementation for xfs, ext and btrfs
libblkid: add FSLASTBLOCK field interface showing area occupied by fs
Karel Zak [Mon, 2 May 2022 10:57:13 +0000 (12:57 +0200)]
more: avoid infinite loop on --squeeze
The command 'echo | more -s' ends in infinite loop if exit-on-EOF is
disabled (default now). We need to call more_key_command() to ask for
user's reaction.
Fixes: https://github.com/util-linux/util-linux/issues/1669 Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 2 May 2022 10:15:32 +0000 (12:15 +0200)]
Merge branch 'meson' of https://github.com/neheb/util-linux
* 'meson' of https://github.com/neheb/util-linux:
meson: make libpam optional
meson: fix tzname check
meson: fix isnan check
meson: add _GNU_SOURCE for sighandler_t
meson: fix environ search
meson: fix cpu_set_t test
meson: don't use run
meson: fix compilation without systemd
The btrfs is one of the popular filesystem which is supported by
blkid. However, the image for 'low-probe' tests was missing. Add
115M BTRFS default image (mkfs.btrfs btrfs.img).
libfdisk: (gpt) Add UUID for Marvell Armada 3700 Boot partition
This GPT UUID is used by BootROM on Marvell Armada 3700 SoC. BootROM
searches for GPT partition with this UUID on attached SATA disk and loads
bootloader from it.
Marvell Armada 3700 SoC is used e.g. on popular EspressoBIN SBC board which
has relatively solid Linux support.
Information about SATA booting and this GPT partition is currently
documented only in development version of ARM Trusted-Firmware-A
documentation:
Warner Losh [Fri, 29 Apr 2022 21:29:44 +0000 (15:29 -0600)]
BSD: Use byteswap.h and endian.h defined macos when present
Newer versions of FreeBSD will have a glibc compatible
byteswap.h. Currently, this file assumes that FreeBSD requires
bswap{16,32,64} to always be defined. This isn't the case when we're
using the byteswap.h file (which is enabled by HAVE_BYTESWAP_H
define). Assume that if byteswap.h and endian.h are present, then the
proper macros are defined. Otherwise, assume that sys/endian.h is
present and paper over the small differences between the BSDs for this
file.
libblkid: add FSLASTBLOCK field interface showing area occupied by fs
Add interface to let filesystem set FSLASTBLOCK which is basically
total number of fsblocks (area occupied by fs). Enable that field in
the 'superblocks' sample.