search for: free_space

Displaying 20 results from an estimated 107 matches for "free_space".

2017 Oct 03
0
[PATCH v2 1/2] daemon: Reimplement statvfs API in OCaml.
...alue devv); @@ -52,7 +61,7 @@ extern value guestfs_int_mllib_sync (value unitv); extern value guestfs_int_mllib_fsync_file (value filenamev); extern value guestfs_int_mllib_mkdtemp (value val_pattern); extern value guestfs_int_mllib_realpath (value pathv); -extern value guestfs_int_mllib_statvfs_free_space (value pathv); +extern value guestfs_int_mllib_statvfs_statvfs (value pathv); /* NB: This is a "noalloc" 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 (v...
2017 Oct 04
2
[PATCH v3 0/2] builder: Choose better weights in the planner.
v2 -> v3: - Drop gnulib fallback.
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
2019 Apr 04
1
[PATCH RFC 1/4] vsock/virtio: reduce credit update messages
...wd_cnt); pkt->hdr.buf_alloc = cpu_to_le32(vvs->buf_alloc); spin_unlock_bh(&vvs->tx_lock); @@ -256,6 +257,7 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, struct virtio_vsock_sock *vvs = vsk->trans; struct virtio_vsock_pkt *pkt; size_t bytes, total = 0; + s64 free_space; int err = -EFAULT; spin_lock_bh(&vvs->rx_lock); @@ -288,9 +290,15 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, } spin_unlock_bh(&vvs->rx_lock); - /* Send a credit pkt to peer */ - virtio_transport_send_credit_update(vsk, VIRTIO_VSOCK_TYPE_STREAM, -...
2020 Apr 06
0
[v2v PATCH 2/2] Consolidate handling of temporary files/dirs
...s insufficient free space in * the temporary directory used to store overlays on the host * (RHBZ#1316479). Although only a few hundred MB is actually @@ -273,12 +271,12 @@ and overlay_dir = (open_guestfs ())#get_cachedir () * guestfs appliance which is also stored here. *) and check_host_free_space () = - let free_space = StatVFS.free_space (StatVFS.statvfs overlay_dir) in - debug "check_host_free_space: overlay_dir=%s free_space=%Ld" - overlay_dir free_space; + let free_space = StatVFS.free_space (StatVFS.statvfs cachedir) in + debug "check_host_free_space: cachedir...
2009 Mar 20
1
[PATCH 2/4] Btrfs: clean up find_free_extent
...= btrfs_lookup_first_block_group(root->fs_info, - search_start); - space_info = __find_space_info(root->fs_info, data); - +search: down_read(&space_info->groups_sem); - while (1) { + list_for_each_entry(block_group, &space_info->block_groups, list) { struct btrfs_free_space *free_space; - /* - * the only way this happens if our hint points to a block - * group thats not of the proper type, while looping this - * should never happen - */ - if (empty_size) - extra_loop = 1; - if (!block_group) - goto new_group_no_lock; + atomic_inc(&block_group-&gt...
2020 Apr 06
0
[PATCH virt-v2v v2 2/2] v2v: Allow large temporary directory to be set on a global basis.
...s insufficient free space in * the temporary directory used to store overlays on the host * (RHBZ#1316479). Although only a few hundred MB is actually @@ -273,12 +271,12 @@ and overlay_dir = (open_guestfs ())#get_cachedir () * guestfs appliance which is also stored here. *) and check_host_free_space () = - let free_space = StatVFS.free_space (StatVFS.statvfs overlay_dir) in - debug "check_host_free_space: overlay_dir=%s free_space=%Ld" - overlay_dir free_space; + let free_space = StatVFS.free_space (StatVFS.statvfs large_tmpdir) in + debug "check_host_free_space: larg...
2019 Sep 03
2
[PATCH v4 2/5] vsock/virtio: reduce credit update messages
...oc = cpu_to_le32(vvs->buf_alloc); > spin_unlock_bh(&vvs->tx_lock); > @@ -261,6 +262,7 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, > struct virtio_vsock_sock *vvs = vsk->trans; > struct virtio_vsock_pkt *pkt; > size_t bytes, total = 0; > + u32 free_space; > int err = -EFAULT; > > spin_lock_bh(&vvs->rx_lock); > @@ -291,11 +293,19 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, > virtio_transport_free_pkt(pkt); > } > } > + > + free_space = vvs->buf_alloc - (vvs->fwd_cnt - vvs->la...
2019 Sep 03
2
[PATCH v4 2/5] vsock/virtio: reduce credit update messages
...oc = cpu_to_le32(vvs->buf_alloc); > spin_unlock_bh(&vvs->tx_lock); > @@ -261,6 +262,7 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, > struct virtio_vsock_sock *vvs = vsk->trans; > struct virtio_vsock_pkt *pkt; > size_t bytes, total = 0; > + u32 free_space; > int err = -EFAULT; > > spin_lock_bh(&vvs->rx_lock); > @@ -291,11 +293,19 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, > virtio_transport_free_pkt(pkt); > } > } > + > + free_space = vvs->buf_alloc - (vvs->fwd_cnt - vvs->la...
2019 Apr 05
1
[PATCH RFC 1/4] vsock/virtio: reduce credit update messages
...04, 2019 at 12:58:35PM +0200, Stefano Garzarella wrote: > > @@ -256,6 +257,7 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, > > struct virtio_vsock_sock *vvs = vsk->trans; > > struct virtio_vsock_pkt *pkt; > > size_t bytes, total = 0; > > + s64 free_space; > > Why s64? buf_alloc, fwd_cnt, and last_fwd_cnt are all u32. fwd_cnt - > last_fwd_cnt <= buf_alloc is always true. > Right, I'll use a u32 for free_space! Is is a leftover because initially I implemented something like virtio_transport_has_space(). > > int err =...
2019 Apr 05
1
[PATCH RFC 1/4] vsock/virtio: reduce credit update messages
...04, 2019 at 12:58:35PM +0200, Stefano Garzarella wrote: > > @@ -256,6 +257,7 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, > > struct virtio_vsock_sock *vvs = vsk->trans; > > struct virtio_vsock_pkt *pkt; > > size_t bytes, total = 0; > > + s64 free_space; > > Why s64? buf_alloc, fwd_cnt, and last_fwd_cnt are all u32. fwd_cnt - > last_fwd_cnt <= buf_alloc is always true. > Right, I'll use a u32 for free_space! Is is a leftover because initially I implemented something like virtio_transport_has_space(). > > int err =...
2010 Sep 25
3
LUKS create_encrypted_fs
Hi All, This is my first post to centos-docs. I've read several months of archives, but, this may be too trivial. Re: http://wiki.centos.org/TipsAndTricks/EncryptedFilesystem/Scripts This line: FREE_SPACE=$(df -m $SECRET_PATH |grep / | awk '{ print $4 }') gave me a problem due to line wrapping in df. For example: $ df -m /home/ja/verify/ Filesystem 1M-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 589333 289168 269746 52...
2020 Apr 06
4
[v2v PATCH 1/2] v2v: nbdkit: change base dir for nbdkit sockets/pidfiles
Since this new temporary directory will contain UNIX sockets for communicating with nbdkit, then its path must not be too long. Use the existing directory that libguestfs exposes for this, i.e. sockdir. --- v2v/nbdkit.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/v2v/nbdkit.ml b/v2v/nbdkit.ml index 65317f9b..46b20c9d 100644 --- a/v2v/nbdkit.ml +++ b/v2v/nbdkit.ml
2020 Apr 06
6
[PATCH virt-v2v v2 0/2] v2v: Large temporary directory handling.
v1 was here: https://www.redhat.com/archives/libguestfs/2020-April/msg00007.html There's a BZ for this now which I forgot to add to the commit message: https://bugzilla.redhat.com/show_bug.cgi?id=1814611 For v2: - Fix incorrect reference to $TMPDIR in existing manual. - Separate handling for small temporary files and large temporary files. Small temporary files go into $TMPDIR
2019 Apr 04
0
[PATCH RFC 1/4] vsock/virtio: reduce credit update messages
On Thu, Apr 04, 2019 at 12:58:35PM +0200, Stefano Garzarella wrote: > @@ -256,6 +257,7 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, > struct virtio_vsock_sock *vvs = vsk->trans; > struct virtio_vsock_pkt *pkt; > size_t bytes, total = 0; > + s64 free_space; Why s64? buf_alloc, fwd_cnt, and last_fwd_cnt are all u32. fwd_cnt - last_fwd_cnt <= buf_alloc is always true. > int err = -EFAULT; > > spin_lock_bh(&vvs->rx_lock); > @@ -288,9 +290,15 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, > } > spi...
2019 Jul 17
0
[PATCH v4 2/5] vsock/virtio: reduce credit update messages
...wd_cnt); pkt->hdr.buf_alloc = cpu_to_le32(vvs->buf_alloc); spin_unlock_bh(&vvs->tx_lock); @@ -261,6 +262,7 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, struct virtio_vsock_sock *vvs = vsk->trans; struct virtio_vsock_pkt *pkt; size_t bytes, total = 0; + u32 free_space; int err = -EFAULT; spin_lock_bh(&vvs->rx_lock); @@ -291,11 +293,19 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, virtio_transport_free_pkt(pkt); } } + + free_space = vvs->buf_alloc - (vvs->fwd_cnt - vvs->last_fwd_cnt); + spin_unlock_bh(&vvs->...
2017 Mar 13
0
[PATCH] mllib: Add a binding for realpath(3).
...nv, value strv, value flagsv extern value guestfs_int_mllib_sync (value unitv); extern value guestfs_int_mllib_fsync_file (value filenamev); extern value guestfs_int_mllib_mkdtemp (value val_pattern); +extern value guestfs_int_mllib_realpath (value pathv); extern value guestfs_int_mllib_statvfs_free_space (value pathv); /* NB: This is a "noalloc" call. */ @@ -196,6 +198,22 @@ guestfs_int_mllib_mkdtemp (value val_pattern) } value +guestfs_int_mllib_realpath (value pathv) +{ + CAMLparam1 (pathv); + CAMLlocal1 (rv); + char *r; + + r = realpath (String_val (pathv), NULL); + if (r =...
2017 Mar 13
2
[PATCH] mllib: Add a binding for realpath(3).
I was planning to use this function to harden the code in v2v/input_ova.ml against malicious OVA files. However I didn't complete that work. Hate to see a good commit go to waste ... Rich.
2014 Jun 13
3
[PATCH 0/2] sparsify: Add --tmp option to allow specifying temporary directory or block device.
The first patch is just some simple refactoring. See the second patch for a description of the new virt-sparsify --tmp option. I tested this using a loopback device as my temporary block device, and it seems to work fine for me. Federico .. this needs a BZ :-) Rich.