search for: f_blocks

Displaying 20 results from an estimated 49 matches for "f_blocks".

2007 Aug 27
17
statvfs change
...rd so that + * we return valid (but less precise) block information. + */ +static void +rescale_frsize(struct statvfs64 *sbp) +{ + /* + * We''re limited to 32 bits for the number of frsize blocks. + * Find the smallest power of 2 that won''t cause EOVERFLOW. + */ + while (sbp->f_blocks > UINT32_MAX && sbp->f_frsize < (1U << 31)) { + sbp->f_frsize <<= 1; + sbp->f_blocks >>= 1; + sbp->f_bfree >>= 1; + sbp->f_bavail >>= 1; + } +} + static int cstatvfs32(struct vfs *vfsp, struct statvfs32 *ubp) { @@ -114,10 +135,28...
2017 Oct 03
0
[PATCH v2 1/2] daemon: Reimplement statvfs API in OCaml.
...oc" call. */ value @@ -207,20 +216,129 @@ guestfs_int_mllib_realpath (value pathv) } value -guestfs_int_mllib_statvfs_free_space (value pathv) +guestfs_int_mllib_statvfs_statvfs (value pathv) { CAMLparam1 (pathv); - CAMLlocal1 (rv); + int64_t f_bsize; + int64_t f_frsize; + int64_t f_blocks; + int64_t f_bfree; + int64_t f_bavail; + int64_t f_files; + int64_t f_ffree; + int64_t f_favail; + int64_t f_fsid; + int64_t f_flag; + int64_t f_namemax; + CAMLlocal2 (rv, v); + +#ifdef HAVE_STATVFS struct statvfs buf; - int64_t free_space; - if (statvfs (String_val (pathv), &b...
2018 Jan 04
2
virtdf outputs on host differs from df in guest
...   941860   0% /sys/fs/cgroup /dev/sda1                  508588  133328    375260  27% /boot tmpfs                      188376       0    188376   0% /run/user/0 using scripts: python -c 'import os; s = os.statvfs ("/"); print s' posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=5886149, f_bfree=4802342, f_bavail=4802342, f_files=23556096, f_ffree=23435372, f_favail=23435372, f_flag=4096, f_namemax=255) python -c 'import os; s = os.statvfs ("/boot"); print s' posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=127147, f_bfree=93815, f_bavail=93...
2017 Oct 02
3
[PATCH 0/2] builder: Choose better weights in the planner.
It started out as "this'll be just a simple fix ..." and turned into something a bit over-engineered in the end. Here it is anyway. Rich.
2017 Oct 03
4
[PATCH v2 0/2] builder: Choose better weights in the planner.
v1 -> v2: - Removed the f_type field from StatVFS.statvfs structure. - New function StatVFS.filesystem_is_remote, written in C. [Thinking about it, this should probably be called ?is_network_filesystem?, but I can change that before pushing]. - Use statvfs instead of fstatvfs, and statfs instead of fstatfs. - Rejigged the comments in builder/builder.ml to make them simpler
2017 Oct 04
2
[PATCH v3 0/2] builder: Choose better weights in the planner.
v2 -> v3: - Drop gnulib fallback.
2007 Aug 30
0
[ufs-discuss] statvfs change
...wondering sometimes whether it''d been the right thing to claim >"statvfs must be 100% accurate". > >[ ... ] >> I''m not suggesting that we just truncate the number of blocks. >> We''re also adjusting the unit size (f_frsize) so that >> (f_blocks * f_frsize) is the same before and after the rescaling. >> >> Yes, there might be a rounding error of up to (f_frsize - 1) *bytes*. >> So on a 1PB fs, we might be off by (256K - 1) bytes. That''s >> 0.000000026 percent. It doesn''t seem like it would genera...
2018 Jan 04
2
Re: virtdf outputs on host differs from df in guest
...018-01-04 19:41:27, "Richard W.M. Jones" <rjones@redhat.com> wrote: >On Thu, Jan 04, 2018 at 12:58:40PM +0800, Chen Fan wrote: >[In guest] >> python -c 'import os; s = os.statvfs ("/"); print s' >> posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=5886149, >> f_bfree=4802342, f_bavail=4802342, f_files=23556096, >> f_ffree=23435372, f_favail=23435372, f_flag=4096, f_namemax=255) >> >> python -c 'import os; s = os.statvfs ("/boot"); print s' >> posix.statvfs_result(f_bsize=4096, f_frsize=4096, f...
2018 Jan 04
0
Re: virtdf outputs on host differs from df in guest
On Thu, Jan 04, 2018 at 12:58:40PM +0800, Chen Fan wrote: [In guest] > python -c 'import os; s = os.statvfs ("/"); print s' > posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=5886149, > f_bfree=4802342, f_bavail=4802342, f_files=23556096, > f_ffree=23435372, f_favail=23435372, f_flag=4096, f_namemax=255) > > python -c 'import os; s = os.statvfs ("/boot"); print s' > posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=127147, >...
2006 Jun 08
7
Wrong reported free space over NFS
NFS server (b39): bash-3.00# zfs get quota nfs-s5-s8/d5201 nfs-s5-p0/d5110 NAME PROPERTY VALUE SOURCE nfs-s5-p0/d5110 quota 600G local nfs-s5-s8/d5201 quota 600G local bash-3.00# bash-3.00# df -h | egrep "d5201|d5110" nfs-s5-p0/d5110 600G 527G 73G 88% /nfs-s5-p0/d5110
2019 May 05
3
Staged installation fail on some file systems
...(SIGRT_1, {0x7fde2bc13820, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7fde2bc1c5d0}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0 statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=40...
2006 Jan 25
1
EXT3: failed to claim external journal device.
We are having problems remounting an ext3 filesystem using an external journal device. The filesystem in question was working fine until the server was rebooted. This is what we see on dmesg when trying to mount: EXT3: failed to claim external journal device. The external journal lives on a LVM2 logical volume and it seems to be accessible ( we can dumpe2fs and see filesystem information).
2013 Sep 16
2
Re: Numbers behind "df" and "tune2fs"
...e 'df' act like Minix. > > which is pretty unhelpful I suppose. ;) > > The mount man page is a little more helpful: > > bsddf|minixdf > Set the behaviour for the statfs system call. The minixdf > behaviour is to return in the f_blocks field the total number > of blocks of the filesystem, while the bsddf behaviour (which > is the default) is to subtract the overhead blocks used by the > ext2 filesystem and not available for file storage. > > You're seeing the latter be...
2013 Sep 16
0
Re: Numbers behind "df" and "tune2fs"
...like BSD. minixdf Make 'df' act like Minix. which is pretty unhelpful I suppose. ;) The mount man page is a little more helpful: bsddf|minixdf Set the behaviour for the statfs system call. The minixdf behaviour is to return in the f_blocks field the total number of blocks of the filesystem, while the bsddf behaviour (which is the default) is to subtract the overhead blocks used by the ext2 filesystem and not available for file storage. You're seeing the latter behavior. if you mount wi...
2019 May 07
2
Staged installation fail on some file systems
...ER|SA_RESTART|SA_SIGINFO, 0x7fde2bc1c5d0}, NULL, 8) = 0 > > rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 > > getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 > > statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096, > > f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, > > 0}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0 > > statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096, > > f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0,...
2007 Mar 29
3
tune2fs -l stale info
Hello, I just noticed that 'tune2fs -l' did not returned a "lively" updated information regarding the free inodes count (looks like it's always correct after unmounting). It became suprising after an online resizing operation, where the total inode count was immediatly updated (grown in my case) but the free inode count was the same: one could deduce that suddenly a lot of
2013 Sep 16
0
Re: Numbers behind "df" and "tune2fs"
...gt;> >> which is pretty unhelpful I suppose. ;) >> >> The mount man page is a little more helpful: >> >> bsddf|minixdf >> Set the behaviour for the statfs system call. The minixdf >> behaviour is to return in the f_blocks field the total number >> of blocks of the filesystem, while the bsddf behaviour (which >> is the default) is to subtract the overhead blocks used by the >> ext2 filesystem and not available for file storage. >> >> You're...
2018 Jan 04
0
Re: virtdf outputs on host differs from df in guest
To summarise: >[In guest] > python -c 'import os; s = os.statvfs ("/boot"); print s' > posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=127147, > f_bfree=93815, f_bavail=93815, f_files=512000, f_ffree=511626, > f_favail=511626, f_flag=4096, f_namemax=255) >[From the host via libguestfs] > # sudo guestfish --ro -d rpm-build-for-7.2 -i statvfs /boot > bsize: 4096 > frsize: 4096 > blocks: 127147 > bfree: 10021...
2006 Aug 17
0
[RFC] proposed extensions for SFTP
...(st->f_flag & ST_NOSUID) + flag |= SSH2_FX_ST_NOSUID; + + buffer_init(&msg); + buffer_put_char(&msg, SSH2_FXP_EXTENDED_REPLY); + buffer_put_int(&msg, id); + buffer_put_int(&msg, st->f_bsize); + buffer_put_int(&msg, st->f_frsize); + buffer_put_int64(&msg, st->f_blocks); + buffer_put_int64(&msg, st->f_bfree); + buffer_put_int64(&msg, st->f_bavail); + buffer_put_int64(&msg, st->f_files); + buffer_put_int64(&msg, st->f_ffree); + buffer_put_int64(&msg, st->f_favail); + buffer_put_int(&msg, st->f_fsid); + buffer_put_int(&...
2006 Aug 19
0
[PATCH] add statfs extension to sftp-server
...buffer_free(&msg); } +static void +send_statfs(u_int32_t id, struct statfs *st) +{ + Buffer msg; + + buffer_init(&msg); + buffer_put_char(&msg, SSH2_FXP_EXTENDED_REPLY); + buffer_put_int(&msg, id); + buffer_put_int(&msg, st->f_bsize); + buffer_put_int64(&msg, st->f_blocks); + buffer_put_int64(&msg, st->f_bfree); + buffer_put_int64(&msg, st->f_bavail); + buffer_put_int64(&msg, st->f_files); + buffer_put_int64(&msg, st->f_ffree); + send_msg(&msg); + buffer_free(&msg); +} + /* parse incoming */ static void @@ -1049,6 +1068,25 @@...