search for: ftruncat

Displaying 20 results from an estimated 463 matches for "ftruncat".

Did you mean: ftruncate
2007 Nov 12
2
Bug#447153: /usr/bin/scp: Fails to notice write errors
...t64 resumed> {st_mode=S_IFREG|0744, st_size=141, ...}) = 0 [pid 25301] read(0, <unfinished ...> [pid 25301] <... read resumed> "import gtk\nimport locale\nlocale."..., 141) = 141 [pid 25301] write(3, "import gtk\nimport locale\nlocale."..., 141) = 141 [pid 25301] ftruncate64(3, 141) = 0 [pid 25301] close(3) = 0 [pid 25301] read(0, "\0", 1) = 1 [pid 25301] write(1, "\0", 1) = 1 [pid 25301] read(0, <unfinished ...> [pid 25301] <... read resumed> "", 1) = 0 [pid 25301] exit_gro...
1998 Apr 15
1
Error messages in log.smb
Last friday we upgraded from 1.9.17p4 to version 1.9.18p3 on a HP-UX 9.04 machine. Now we get lots of entries in the log.smb file like: ERROR: del_share_mode: failed to ftruncate share mode file /programs/samba/var/locks/share.1073807365.8199 to size 42 (Permission denied) ERROR: set_share_mode: failed to ftruncate share mode file /programs/samba/var/locks/share.1073807365.8195 to size 42 (Permission denied) ERROR: set_share_mode: failed to ftruncate share mode file /progr...
1997 Sep 26
1
Samba 1.9.17 fails to truncate share mode file (fwd)
Thank you for the information that you have passed on to me. My own research has found that ftruncate is quite happy to set a file to the same size that it is already, so something else must be causing the problem. The comment before the ftruncate in set_share_mode says the file is being truncated just for safety, so normally it is probably not necessary to truncate the file. Regards, Tim >...
2003 Nov 25
2
[patch] ftruncate & vsyslog
Hi, Two patches to add ftruncate and vsyslog syscalls. These were in the klibc that Greg K-H has in the udev tarball. I got his permission to contribute them to the main-line klibc. mh -- Martin Hicks Wild Open Source Inc. mort@wildopensource.com 613-266-2296 -------------- next part -------------- A non-...
2013 Nov 30
4
[Bug 2176] New: unchecked returned value from ftruncate
https://bugzilla.mindrot.org/show_bug.cgi?id=2176 Bug ID: 2176 Summary: unchecked returned value from ftruncate Product: Portable OpenSSH Version: -current Hardware: All OS: All Status: NEW Severity: minor Priority: P5 Component: sftp Assignee: unassigned-bugs at mindrot.org Reporter: loganaden at gm...
2006 Aug 24
2
extending files slow on FAT filesystems
Hi, I'm running Samba 3.0.23a on Linux. One of my share is a USB disk with a FAT32 filesystem. When copying large files from my Windows XP machine to this share, smbd seem to "reserve" (by using ftruncate()) the space needed on the USB disk before actually doing any copying. This ftruncate() operation takes quite a while when the file is large. It may even cause the client to time out. If I reformat the disk with ext2, ftruncate() runs fast. Is there some way of turning off this "pre-allocat...
1998 Feb 11
3
What does this mean ?
Samba 1.9.17p1. The log file contains Ks of messages like this: ERROR: set_share_mode: failed to ftruncate share mode file /usr/adm/locks/share.119542272.430101 to size 64 (Permission denied) ERROR: set_share_mode: failed to ftruncate share mode file /usr/adm/locks/share.119542272.430101 to size 64 (Permission denied) ERROR: set_share_mode: failed to ftruncate share mode file /usr/adm/locks/share.11954...
2005 Sep 21
2
locking.tdb: expand_file ftruncate to 8192 failed (Permission denied)
...3.0.x (tested on 3.0.10 and 3.0.20). Users can create and modfy files, but cannot delete them. The logs show [2005/09/21 20:48:14, 0, pid=18388, effective(4019, 412), real(4019, 0)] tdb/tdbutil.c:tdb_log(767) tdb(/srv/physik.fu-berlin.de/data/.samba/cluster1-test/cache/locking.tdb): expand_file ftruncate to 8192 failed (Permission denied) [2005/09/21 20:48:15, 0, pid=18388, effective(4019, 412), real(4019, 0)] tdb/tdbutil.c:tdb_log(767) tdb(/srv/physik.fu-berlin.de/data/.samba/cluster1-test/cache/locking.tdb): expand_file ftruncate to 8192 failed (Permission denied) [2005/09/21 20:48:15, 0, pid=...
2015 Feb 11
4
Samba 4.2.0rc4 fails to start up
...fail_close; } DEBUG(1, ("unique is %u\n", unique)); unique_len = snprintf(buf, sizeof(buf), "%ju\n", (uintmax_t)unique); DEBUG(1, ("unique_len is: %i\n", unique_len)); /* shorten a potentially preexisting file */ ret = ftruncate(lockfile_fd, unique_len); if (ret == -1) { ret = errno; DEBUG(1, ("%s: ftruncate failed: %s\n", __func__, strerror(ret))); goto fail_unlink; } And the output of ./smbd -i -d 2 is: lock file name i...
2017 Dec 06
1
Crash in glusterd!!!
...vailable] > : > : > : > [2017-12-01 14:10:16.862903] E [MSGID: 113001] [posix-helpers.c:1228:posix_fhandle_pair] > 0-c_glusterfs-posix: fd=18: key:trusted.bit-rot.version [No space left on > device] > [2017-12-01 14:10:16.862985] I [MSGID: 115063] [server-rpc-fops.c:1317:server_ftruncate_cbk] > 0-c_glusterfs-server: 92: FTRUNCATE 1 (934f08b7-e3b5-4690-84fc-742a4b1fb78b)==> > (No space left on device) [No space left on device] > [2017-12-01 14:10:16.907037] E [MSGID: 113001] [posix-helpers.c:1228:posix_fhandle_pair] > 0-c_glusterfs-posix: fd=17: key:trusted.bit-rot.v...
2003 Apr 10
1
vfat / ftruncate problem
...Windows Explorer, it will fail. I messed with a multitude of samba options and mount options for the vfat partition all to no avail. I finally think I've homed in on the problem when I set Samba to log level 10, (log level 9 was not sufficient) at which point I discovered its hanging up on a ftruncate command. When I attempt to copy my 750Meg file to the samba shared vfat partition, the last couple things logged are an fallocate IIRC, and then an ftruncate, the server just sits there 90 seconds or so grinding and grinding then I guess something times out and either Samba drops the connection t...
2006 Feb 25
9
trace("") prints hex dump table
I''m running SunOS unknown 5.11 snv_33 i86pc i386 i86pc and to print a blank line in the output of my script I tried adding: trace(""); which printed 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2004 Oct 19
0
libsmbclient ftruncate
All, I am trying to build some SMB functionality into one of my existing programs using libsmbclient. The interface has everything I need, except for the ability to shrink files (basically do an ftruncate). Looking at some ethereal captures, it looks like when a client wants to do a shrink of a file, it issues a TRANS2 with SET_FILE_INFO and SMB_FILE_END_OF_FILE_INFO, and SMB_FILE_ALLOCATION_INFO. Is there any way I can approximate this using the current smbc_* functions, or do I have to writ...
2007 Nov 05
13
preallocate CPU usage - pre4
When I use the preallocate patch and create a 77GB file using the function I get a CPU spike on the server-side. The spike lasts about 20 minutes and uses about 20%-25% of the cpu associated with the rsync instance creating the file. The spike is directly linked to the time it takes to create the file. I compiled rsync using cygwin CVS. I initially suspected the implementation of
2017 Oct 23
8
lld: sigbus error handling
If your system does not support fallocate(2), we use ftruncate(2) to create an output file. fallocate(2) succeeds even if your disk have less space than the requested size, because it creates a sparse file. If you mmap such sparse file, you'll receive a SIGBUS when the disk actually becomes full. So, lld can die suddenly with SIGBUS when your disk become...
2015 Feb 10
1
Samba 4.2.0rc4 fails to start up
I am trying to see if Samba 4.2.0rc4 will run on a Solaris 10 i386 system. After getting it to build, startup fails. Starting it up as smbd -i -d 10 The output indicates that everything is starting normally until the following is output: messaging_dgm_lockfile_create: ftruncate failed: Invalid argument messaging_dgm_init: messaging_dgm_create_lockfile failed: Invalid argument messaging_dgm_init failed: Invalid argument And then it exits. Where do I start to look to find the problem? Tom Schulz Applied Dynamics Intl. schulz at adi.com
2009 Oct 15
1
PATCH: --write-devices to allow synchronising to a block device
...const char *fname, int fd, OFF_T total_size) { + STRUCT_STAT st; static char file_sum1[MAX_DIGEST_LEN]; static char file_sum2[MAX_DIGEST_LEN]; struct map_struct *mapbuf; @@ -285,10 +287,14 @@ goto report_write_error; #ifdef HAVE_FTRUNCATE - if (inplace && fd != -1 - && ftruncate(fd, offset) < 0) { - rsyserr(FERROR_XFER, errno, "ftruncate failed on %s", - full_fname(fname)); + (void)do_fstat(fd,&st); + /* Makes no sense to attempt to ftru...
2007 Jul 04
2
Samba Problem With Big File Transfer on Windows Client
I use fedora 7 and the last stable version of samba 3.0.25a-3 on an embedded linux system as a server and a windows xp. I 'am using truecrypt and sharing de mount directory with the XP machine via samba. Selniux is disabled. Everything works well such as connection or small files transfers but we have a huge problem when we try to transfer a big file (~100 MB) from the client (Windows) to the
2017 Dec 06
2
[Gluster-devel] Crash in glusterd!!!
...gt; : >> [2017-12-01 14:10:16.862903] E [MSGID: 113001] >> [posix-helpers.c:1228:posix_fhandle_pair] 0-c_glusterfs-posix: fd=18: >> key:trusted.bit-rot.version [No space left on device] >> [2017-12-01 14:10:16.862985] I [MSGID: 115063] >> [server-rpc-fops.c:1317:server_ftruncate_cbk] 0-c_glusterfs-server: 92: >> FTRUNCATE 1 (934f08b7-e3b5-4690-84fc-742a4b1fb78b)==> (No space left on >> device) [No space left on device] >> [2017-12-01 14:10:16.907037] E [MSGID: 113001] >> [posix-helpers.c:1228:posix_fhandle_pair] 0-c_glusterfs-posix: fd=17: >&...
2013 Oct 22
2
[PATCH 1/2] Preallocate output file
..._uncompress (const char *filename, const char *outputfile, debug ("uncompressed size = %" PRIu64 " bytes", size); ofd = open (outputfile, O_WRONLY|O_CREAT|O_TRUNC|O_NOCTTY, 0644); if (ofd == -1) error (EXIT_FAILURE, errno, "open: %s", outputfile); - if (ftruncate (ofd, size) == -1) - error (EXIT_FAILURE, errno, "ftruncate: %s", outputfile); + if (fallocate (ofd, 0, 0, size) == -1) + error (EXIT_FAILURE, errno, "fallocate: %s", outputfile); /* Tell the kernel we won't read the output file. */ posix_fadvise (fd, 0, 0, PO...