search for: file_size

Displaying 20 results from an estimated 72 matches for "file_size".

2006 Nov 16
1
Regarding debugocfs
Hi experts, My customer issued debugocfs to check for file_size and extent info but values such as file_size, alloc_size, next_free_ext were 0. (/dev/sdi1 contains datafiles and arc files) # debugocfs -a 0 /dev/sdi1 debugocfs 1.0.10-PROD1 Fri Mar 5 14:35:29 PST 2004 (build fcb0206676afe0fcac47a99c90de0e7b) file_extent_0: file_number = 128 disk_offset = 1433600...
2017 Feb 15
2
Problem using Boost Filesystem with Clang
...#include <iostream> #include <boost/filesystem.hpp> using namespace boost::filesystem; int main(int argc, char* argv[]) { if (argc < 2) { std::cout << "Usage: tut1 path\n"; return 1; } std::cout << argv[1] << " " << file_size(argv[1]) << '\n'; return 0; } ------------------------------------------------------------------------ If I compile with g++ using "g++ -lboost_system -lboost_filesystem main.cpp” and run it I obtain the size of a file that I use as input. If I compile with clang++ using &quo...
2013 Aug 05
1
Corrupted mboxes with v2.2.4, posix_fallocate and GFS2
...ses the file size in 4 kB chunks (there seems to be no guarantee anyway that posix_allocate will extend a file by the exact size requested). After a successful posix_fallocate call, mbox_sync_handle_eof_updates currently proceeds in rewriting the mailbox starting from the originally intended 'file_size': 1306 if (file_set_size(sync_ctx->write_fd, 1307 file_size + -sync_ctx->space_diff) < 0) { 1308 mbox_set_syscall_error(sync_ctx->mbox, 1309 &quo...
2013 Apr 05
0
[PATCHv2 1/2] Xen PV backend (for qemu-upstream-4.2-testing): Move call to bdrv_new from blk_init to blk_connect
...{ /* setup via qemu cmdline -> already setup for us */ @@ -638,7 +669,6 @@ static int blk_init(struct XenDevice *xendev) blkdev->bs = blkdev->dinfo->bdrv; } bdrv_attach_dev_nofail(blkdev->bs, blkdev); - blkdev->file_blk = BLOCK_SIZE; blkdev->file_size = bdrv_getlength(blkdev->bs); if (blkdev->file_size < 0) { xen_be_printf(&blkdev->xendev, 1, "bdrv_getlength: %d (%s) | drv %s\n", @@ -652,31 +682,10 @@ static int blk_init(struct XenDevice *xendev) blkdev->type, blkdev->fileproto, bl...
2002 Jan 30
1
Quick sftp status indicator.
...ude "log.h" #include "atomicio.h" +#include "misc.h" #include "sftp.h" #include "sftp-common.h" @@ -49,6 +50,11 @@ /* Message ID */ static u_int msg_id = 1; +/* Shit required for processmeter() to work BLECH */ +u_int64_t offset; +u_int64_t file_size; +u_int64_t filename; + static void send_msg(int fd, Buffer *m) { @@ -668,13 +674,23 @@ return(filename); } +void +updateprogressmeter(int ignore) +{ + int save_errno = errno; + + progressmeter(0, offset, file_size, filename); + signal(SIGALRM, updateprogressmeter); +...
2008 Dec 04
1
assertion failed in 1.1.7 file mbox-sync.c: line 1305 (mbox_sync_handle_eof_updates)
...he usual "IMAP(username): FETCH for mailbox Sent UID xx got too little data: xx vs xx" messages (that means that unfortunately sometimes some messages are still written truncated) I saw this assertion failure: file mbox-sync.c: line 1305 (mbox_sync_handle_eof_updates): assertion failed: (file_size >= sync_ctx->expunged_space + trailer_size) Regards, Diego. ---- (gdb) bt full #0 0x008a9402 in __kernel_vsyscall () No symbol table info available. #1 0x00a2fd20 in raise () from /lib/libc.so.6 No symbol table info available. #2 0x00a31631 in abort () from /lib/libc.so.6 No symbol tab...
2018 Apr 23
1
Reconstructing files from shards
...u know if those images were sparse files? My understanding is that this will not work with files with holes. Quoting from : http://lists.gluster.org/pipermail/gluster-devel/2017-March/052212.html - - snip 1. A non-existent/missing shard anywhere between offset $SHARD_BLOCK_SIZE through ceiling ($FILE_SIZE/$SHARD_BLOCK_SIZE) indicates a hole. When you reconstruct data from a sharded file of this nature, you need to take care to retain this property. 2. The above is also true for partially filled shards between offset $SHARD_BLOCK_SIZE through ceiling ($FILE_SIZE/$SHARD_BLOCK_SIZE). What do I mean by...
2002 Aug 05
5
[patch] read-devices
...s, I changed the interface of map_ptr. It now returns void rather than char*, and updates two new members of map_struct: - m_ptr contains the pointer to the new data - m_len contains the length of the new data (at most the length requested, but less if EOF encountered) Also, the map_struct->file_size field is now updated by map_ptr() when it encounters an EOF. I updated all invocations of map_ptr() to use the new interface, and act correctly when a premature EOF is encountered. Apart from supporting the new feature, this makes the code more robust to EOFs (no more zeroing buffer memory and...
2007 Oct 09
5
Playing with ReadFileScatter()
...ED | FILE_FLAG_NO_BUFFERING, nil ) if handle == INVALID_HANDLE_VALUE raise SystemCallError.new(GetLastError()) end sysbuf = 0.chr * 40 GetSystemInfo(sysbuf) page_size = sysbuf[8,4].unpack(''L'')[0] # dwPageSize file_size = File.size(file) # FILE_SEGMENT_ELEMENT fse_struct = (0.chr * page_size) + (0.chr * 8) # Buffer + Align. seg_array = (0.chr * (file_size / fse_struct.size)) + 0.chr olapped = 0.chr * 20 bool = ReadFileScatter(handle, seg_array, file_size, nil, olapped)...
2007 Dec 17
3
maildir_uidlist_create assertion failure
I've been getting the following error fairly often, which tends to result in a corrupted dovecot-uidlist. dovecot: IMAP(example at example.com): file maildir-uidlist.c: line 1009 (maildir_uidlist_recreate): assertion failed: (file_size == (uoff_t)st.st_size) dovecot: IMAP(example at example.com): Raw backtrace: imap [0x80cb740] -> imap [0x80cb64a] -> imap [0x8070e58] -> imap(maildir _uidlist_sync_deinit+0xe8) [0x8072d18] -> imap [0x806e9e2] -> imap(maildir_storage_sync_init+0x66) [0x806edf6] -> imap(imap_sync_in...
2006 Nov 07
1
reading VERY large binary files
...es more than a day to run and still won't complete). Is there any faster way to accomplish this? My current procedure looks like this: readHH <- function(file_name, hhid_list) { incon=file(file_name, open="rb") result=data.frame() tran=list() byte_mark=0 last_1M_mod=0 file_size=file.info(file_name)$size write.table(paste("Data pulled from", file_name, sep=" "), file="readHH_output.txt", sep=",", row.names=FALSE, col.names=FALSE, append=TRUE) while (TRUE) { tran$hh_id <- readBin(incon,integer(),1,size=4) if(is.element(...
2017 Feb 13
2
Re: Extract VHD using guestfs
Thanks a lot. I was trying to copy on local disk and guestfs_download () solved my problem. Now I am trying to modify source code of guestfs_download () to extract file in memory. Can you guide me what should i do to achieve that. Mohsin On Fri, Feb 10, 2017 at 2:13 AM, Richard W.M. Jones <rjones@redhat.com> wrote: > On Thu, Feb 09, 2017 at 03:24:53PM +0500, MUHAMMAD MOHSIN wrote:
2005 Apr 27
0
Assertion Failures in Current CVS version
...----------- dovecot: Apr 27 15:16:23 Error: 27291 IMAP(support): mbox sync: UID inserted in the middle of mailbox /mailhome/new/s/b/support/DONE (122769 > 119000) dovecot: Apr 27 15:16:27 Error: 27291 IMAP(support): file mbox-sync.c: line 1154 (mbox_sync_handle_eof_updates): assertion failed: (file_size >= sync_ctx->file_input->v_offset) dovecot: Apr 27 15:16:36 Error: child 27291 (imap) killed with signal 6 Core was generated by `imap'. Program terminated with signal 6, Aborted. (gdb) bt full #0 0xffffe410 in ?? () No symbol table info available. #1 0xbffff4c8 in ?? () No symbol...
2005 Aug 16
2
test80: assert/core debug info
...and GDB cannot access its value. (gdb) print first_nonexpunged No symbol "first_nonexpunged" in current context. (gdb) up #7 0x0003a328 in mbox_sync_handle_eof_updates (sync_ctx=0xffbff708, mail_ctx=0xffbff5d8) at mbox-sync.c:1265 1265 if (mbox_sync_rewrite(sync_ctx, file_size, (gdb) prnt int *sync_ctx $14 = {mbox = 0xa6758, flags = MBOX_SYNC_REWRITE, input = 0xacb78, file_input = 0xaca50, write_fd = 7, index_sync_ctx = 0xa8dc8, sync_view = 0xa92b0, t = 0xab530, hdr = 0xa92f0, header = 0x9e408, from_line = 0x9e2a0, base_uid_validity = 1124147662, base_uid_last = 0...
2017 Dec 02
2
Log rotation issue
On Sat, 2017-12-02 at 11:58 +0530, Anantha Raghava wrote: > Hello Andrew, > > Thanks for proper explanation.  > > To overcome this,  also as we need to store logs for long,  now we > have written a shell script,  executed as a crop every three minutes > that checks the file size.  If the file size is 1 GB or above,  it > moves the log file to
2010 Jul 14
1
[PATCH] gfxboot: fix buffer overrun when loading kernel/initramfs
...xboot.c +++ b/com32/gfxboot/gfxboot.c @@ -21,6 +21,7 @@ #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> +#include <minmax.h> #include <syslinux/loadfile.h> #include <syslinux/config.h> @@ -749,7 +750,7 @@ void *load_one(char *file, ssize_t *file_size) if(size) { buf = malloc(size); for(i = 1, cur = 0 ; cur < size && i > 0; cur += i) { - i = save_read(fd, buf + cur, CHUNK_SIZE); + i = save_read(fd, buf + cur, min(CHUNK_SIZE, size - cur)); if(i == -1) break; gfx_progress_update(i); } -- 1.7...
2018 Apr 23
0
Reconstructing files from shards
From some old May 2017 email. I asked the following: "From the docs, I see you can identify the shards by the GFID # getfattr -d -m. -e hex/path_to_file/ # ls /bricks/*/.shard -lh | grep /GFID Is there a gluster tool/script that will recreate the file? or can you just sort them sort them properly and then simply cat/copy+ them back together? cat shardGFID.1 .. shardGFID.X > thefile
2018 Oct 15
2
[RFC] VSOCK: The performance problem of vhost_vsock.
Hi Stefan & All: Now I find vhost-vsock has two performance problems even if it is not designed for performance. First, I think vhost-vsock should faster than vhost-net because it is no TCP/IP stack, but the real test result vhost-net is 5~10 times than vhost-vsock, currently I am looking for the reason. Second, vhost-vsock only supports two vqs(tx and rx), that means if multiple sockets in
2018 Oct 15
2
[RFC] VSOCK: The performance problem of vhost_vsock.
Hi Stefan & All: Now I find vhost-vsock has two performance problems even if it is not designed for performance. First, I think vhost-vsock should faster than vhost-net because it is no TCP/IP stack, but the real test result vhost-net is 5~10 times than vhost-vsock, currently I am looking for the reason. Second, vhost-vsock only supports two vqs(tx and rx), that means if multiple sockets in
2007 Oct 22
2
Problem in mbox-sync.c
...and fcntl style locking. The output of "dovecot -n" for this system appears below my signature. Periodically we see errors like the following in our logs: Oct 21 19:36:01 postoffice1 dovecot: POP3(someuser): file mbox-sync.c: line 1433 (mbox_sync_handle_eof_updates): assertion failed: (file_size >= sync_ctx->expunged_space + trailer_size) Oct 21 19:36:01 postoffice1 dovecot: POP3(someuser): Raw backtrace: pop3 [0x809eda1] -> pop3 [0x809ecbc] -> pop3(mbox_sync+0x1088) [0x806c4e8] -> pop3(mbox_storage_sync_init+0x3e) [0x806cb6e] -> pop3(client_create+0x1a4) [0x80552a4] -&gt...