mirror of
https://github.com/nilfs-dev/nilfs-utils.git
synced 2026-01-26 13:43:15 +00:00
Although the return value of nilfs_resize_count_inuse_segments() is type ssize_t, nilfs_shrink_online(), which calls it, receives the return value as a local variable of type uint64_t. This causes the following abnormality: 1. If nilfs_resize_count_inuse_segments() returns an error, it is not treated as an error, and the message output assuming its success it not skipped. 2. An abnormal progress message like "Moving xx in-use segment(null)." is output during file system shrink in a 32-bit environment due to type mismatch. Fix these issues by changing the type of the local variable in question to ssize_t. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
* Required packages
- libuuid-devel or uuid-dev
- libmount-devel or libmount-dev
- libblkid-devel or libblkid-dev
- libselinux-devel or libselinux1-dev (*1)
*1: required only if supporting selinux context mount options without
using libmount. By default, libmount is used and support of the
context mount depends on the libmount that distro provides.
* How to compile
$ ./configure
$ make
If your system is a 64-bit architecture and libraries are installed
into /usr/lib64 instead of /usr/lib, change the library directory with
--libdir option:
$ ./configure --libdir=/usr/lib64
If your want to separate the library files into a subdirectory, specify
it as follows, for example:
$ ./configure --libdir=/usr/lib64/nilfs
If /etc/mtab is not a symlink to /proc/self/mounts but a regular file
in the target system, run the configure script with --without-libmount
option:
$ ./configure --without-libmount
This configures the build environment so as to make legacy
mount/umount helpers (mount.nilfs2 and umount.nilfs2), in which the
legacy mtab file is handled properly. For CentOS 6 (and other RHEL 6
clones), for instance, this options is needed.
* Trouble shooting
If the blkid library in your environment is old and unusable to this
package, you can use --without-blkid option:
$ ./configure --without-blkid
However, use of this option is normally not recommended because it
disables the safety check of mkfs.nilfs2 which prevents users from
unexpectedly overwriting an in-use device.
You can compile legacy mount.nilfs2 and umount.nilfs2 without support
of selinux context mount options (-o context=<context>, etc):
$ ./configure --without-libmount --without-selinux
For helpers built with mount library (libmount), support of the
context mount depends on the libmount that distro provides.
* How to get development sources
$ cd your-work-directory
$ git clone https://github.com/nilfs-dev/nilfs-utils.git
Before compiling the development sources, you need to run autogen.sh
script. This is not required for packaged sources unless you changed
the configuration.
$ cd nilfs-utils
$ ./autogen.sh
* Developer's notes
The central resource for nilfs-utils development is the mailing list
(linux-nilfs@vger.kernel.org).
First, please read the following documents (in short, follow Linux
kernel development rules):
https://docs.kernel.org/process/coding-style.html
https://docs.kernel.org/process/submitting-patches.html
Then, check your patches with the patch style checker prior to
submission (scripts/checkpatch.pl) like the following example:
$ ./scripts/checkpatch.pl <patch-file>
...
<patch-file> has no obvious style problems and is ready for submission.
Description
Languages
C
76.2%
Perl
21.1%
M4
1.6%
Makefile
1%