search for: writefd

Displaying 20 results from an estimated 42 matches for "writefd".

Did you mean: write_fd
2004 Jul 14
12
HP-UX 11i and largefiles on rsync 2.6.2
...tested. I have also tried rsync'ing between two local filesystems (both with largefiles supported) with the same result. The rsync transfers always fail at the 2GB mark. The rsync output is as follows: server1 # /tmp/rsync --rsync-path=/tmp/rsync --stats file1.db server2:/archive1 rsync: writefd_unbuffered failed to write 32768 bytes: phase "unknown": Broken pipe rsync error: error in rsync protocol data stream (code 12) at io.c(836) There seem to be some similar questions in the list archives, however the solutions don't seem to be there, or are partial bits of what I hav...
2013 Feb 19
13
[PATCH] mini-os: implement poll(2)
...c +++ b/extras/mini-os/lib/sys.c @@ -31,6 +31,7 @@ #include <tpm_tis.h> #include <xenbus.h> #include <xenstore.h> +#include <poll.h> #include <sys/types.h> #include <sys/unistd.h> @@ -678,6 +679,29 @@ static void dump_set(int nfds, fd_set *readfds, fd_set *writefds, fd_set *except #define dump_set(nfds, readfds, writefds, exceptfds, timeout) #endif +#ifdef LIBC_DEBUG +static void dump_pollfds(struct pollfd *pfd, int nfds, int timeout) +{ + int i, comma, fd; + + printk("["); + comma = 0; + for (i = 0; i < nfds; i++) { + fd...
2020 Aug 18
1
Re: [PATCH nbdkit 7/9] server: Add hand-written replacement for poll for Windows.
...s it worth a surname? > + * under an incompatible license. However Winsock has select so we > + * can write a simple (but slow) emulation of poll using select. > + */ > +int > +poll (struct pollfd *fds, int n, int timeout) > +{ > + int i, nfds = 0, r; > + fd_set readfds, writefds; > + struct timeval tv, *tvp; > + > + FD_ZERO (&readfds); > + FD_ZERO (&writefds); > + > + for (i = 0; i < n; ++i) { > + if (fds[i].events & POLLIN) > + FD_SET (fds[i].fd, &readfds); > + if (fds[i].events & POLLOUT) > + FD_SE...
2013 Jan 03
20
[PATCH] Switch to poll in xenconsoled's io loop.
...ib.h> #include <errno.h> #include <string.h> -#include <sys/select.h> +#include <poll.h> #include <fcntl.h> #include <unistd.h> #include <termios.h> @@ -930,7 +930,6 @@ static void handle_log_reload(void) void handle_io(void) { - fd_set readfds, writefds; int ret; if (log_hv) { @@ -959,21 +958,33 @@ void handle_io(void) for (;;) { struct domain *d, *n; - int max_fd = -1; - struct timeval timeout; + int poll_timeout; /* timeout in milliseconds */ struct timespec ts; long long now, next_timeout = 0; - FD_ZERO(&readfds);...
2002 Jan 13
0
rsynd-2.5.1 / io.c patches
...readfd(f,buf,len); } -void read_sbuf(int f,char *buf,int len) +void read_sbuf(int f, void *buf1,int len) { +unsigned char * buf; + buf = (unsigned char *)buf1; read_buf (f,buf,len); buf[len] = 0; } @@ -375,12 +384,14 @@ } /* write len bytes to fd */ -static void writefd_unbuffered(int fd,char *buf,int len) +static void writefd_unbuffered(int fd, const void * buf1,int len) { int total = 0; fd_set w_fds, r_fds; int fd_count, count; struct timeval tv; +unsigned char * buf; + buf = (unsigned char *)buf1; err_list_p...
2020 Aug 18
0
[PATCH nbdkit 7/9] server: Add hand-written replacement for poll for Windows.
...e emulation of poll written by Paolo, but it's distributed + * under an incompatible license. However Winsock has select so we + * can write a simple (but slow) emulation of poll using select. + */ +int +poll (struct pollfd *fds, int n, int timeout) +{ + int i, nfds = 0, r; + fd_set readfds, writefds; + struct timeval tv, *tvp; + + FD_ZERO (&readfds); + FD_ZERO (&writefds); + + for (i = 0; i < n; ++i) { + if (fds[i].events & POLLIN) + FD_SET (fds[i].fd, &readfds); + if (fds[i].events & POLLOUT) + FD_SET (fds[i].fd, &writefds); + if (fds[i].fd &...
2023 Jan 26
0
[klibc:time64] select: Fix handling of NULL timeout when wrapping pselect()
...ecadent.org.uk> --- usr/klibc/select.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr/klibc/select.c b/usr/klibc/select.c index 7af28fee..8ad93a4b 100644 --- a/usr/klibc/select.c +++ b/usr/klibc/select.c @@ -21,7 +21,8 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, ts.tv_nsec = timeout->tv_usec * 1000; } - result = __pselect6(nfds, readfds, writefds, exceptfds, &ts, NULL); + result = __pselect6(nfds, readfds, writefds, exceptfds, + timeout ? &ts : NULL, NULL); if (timeout) { timeout->tv_sec = ts.tv_sec;
2004 Aug 06
0
Submission: Patch to libshout/sock.c for MacOSX
...d) { #ifdef _WIN32 return closesocket(sockfd); #else return close(sockfd); #endif } /* * Write len bytes from buf to the socket. */ int sock_write_bytes(SOCKET sockfd, const char *buff, const int len) { int wrote, res, polled; // struct pollfd socks; // <SKoT> fd_set writefds; // struct timeval timeout; // </SKoT> /* sanity check */ if (!buff) { return SOCKET_ERROR; } else if (len <= 0) { return SOCKET_ERROR; } else if (!sock_valid_socket(sockfd)) { return SOCKET_ERROR; } FD_ZERO(&writefds); // <SKoT...
2003 Mar 21
2
x>>32 warning in io.c
...sync.h However there is no #ifdef NO_INT64 test protecting line 653. Here are lines 652,653, and 654 from io.c in subr write_longint: SIVAL(b,0,(x&0xFFFFFFFF)); SIVAL(b,4,((x>>32)&0xFFFFFFFF)); writefd(f,b,8); On my system, x>>32 evaluates to the value x, not 0 (since the shift count is invalid). This will cause the upper 4 bytes of b to be the same as the lower 4 bytes of b, even if x is a small value. I am considering using this hack for line 653 to prevent possible problems:...
2008 Jun 06
0
[PATCH] stubdom: permit compilation without lwip
...les[fd].socket.fd, FIONBIO, &nblock); } /* Fallthrough */ +#endif default: printk("fcntl(%d, %d, %lx/%lo)\n", fd, cmd, arg, arg); errno = ENOSYS; @@ -666,9 +676,12 @@ /* Just poll without blocking */ static int select_poll(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds) { - int i, n = 0, sock_n, sock_nfds = 0; + int i, n = 0; +#ifdef HAVE_LWIP + int sock_n, sock_nfds = 0; fd_set sock_readfds, sock_writefds, sock_exceptfds; struct timeval timeout = { .tv_sec = 0, .tv_usec = 0}; +#endif #ifdef LIBC_VERBOSE static int...
2005 Aug 30
4
Re: [Xen-changelog] New console transport and update xenconsoled.
...p;dominfo) == 1) { >- lookup_domain(dominfo.domid); >+ dom = lookup_domain(dominfo.domid); >+ if (dominfo.dying || dominfo.crashed || dominfo.shutdown) >+ dom->is_dead = true; > domid = dominfo.domid + 1; > } > } >@@ -302,12 +435,11 @@ > { > fd_set readfds, writefds; > int ret; >- int max_fd = -1; >- int num_of_writes = 0; > > do { > struct domain *d; > struct timeval tv = { 1, 0 }; >+ int max_fd = -1; > > FD_ZERO(&readfds); > FD_ZERO(&writefds); >@@ -319,42 +451,36 @@ > if (d->tty_fd != -1) {...
2008 Aug 05
1
Also seeing high winbindd CPU usage
I think somebody had a similar problem (also on Solaris), but that thread seemed to die. I've compiled (with Sun Studio cc) and installed samba-3.2.1 on a Solaris 10 x64 box, which is a member of a (Windows Server 2003 controlled) domain. I previously had samba 3.0.28a running on the same machine without any problems. Now winbindd is eating up all of the CPU (on the CPU it's assigned
2004 Oct 01
6
rsync 2.6.3 hang (was rsync 2.6.2 crash)
...2472 dtable::select_write: fd 4 14:04:19 [main] rsync 2472 cygwin_select: to->tv_sec 60, to->tv_usec 0, ms 60000 14:04:19 [main] rsync 2472 cygwin_select: sel.always_ready 0 14:04:19 [main] rsync 2472 start_thread_socket: Handle 0x308 14:04:19 [main] rsync 2472 start_thread_socket: Added to writefds 14:04:19 [main] rsync 2472 start_thread_socket: Handle 0x2C0 14:04:19 [main] rsync 2472 start_thread_socket: Added to readfds 14:04:19 [main] rsync 2472 start_thread_socket: exitsock 0x2E4 14:04:19 [main] rsync 2472 start_thread_socket: stuff_start 0x22E934 14:04:19 [main] rsync 2472 select_stuff:...
2020 Aug 15
3
[PATCH EXPERIMENTAL nbdkit 0/2] Port to Windows using mingw.
The patches following do indeed allow you to compile nbdkit.exe, but it does not actually work yet. I'm posting this experimental series more as a work in progress and to get feedback. Note this does not require Windows itself to build or test. You can cross-compile it using mingw64-* packages on Fedora or Debian, and test it [spoiler alert: it fails] using Wine. Rich.
2004 May 29
1
[patch] Filename conversion
...rapper around select(2) that guarantees Linux-like updating of + * the timeout argument to contain the time left, so we can simply + * re-invoke in case of EINTR or EAGAIN. On BSD, select(2) doesn't + * change the timeout argument by itself. + **/ +int do_select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout) +{ + if (timeout==NULL) { + return select(n, readfds, writefds, exceptfds, timeout); + } else { + struct timeval intended, before, after; + int result; + + intended = *timeout; + gettimeofday(&before, NULL); + result = select(n, readfds, w...
2023 Jan 26
0
[klibc:time64] select: Make all select calls wrappers for pselect6()
...#include <sys/syscall.h> -#if !defined(__NR_select) && !defined(__NR__newselect) - struct __pselect6; __extern int __pselect6(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const struct __pselect6 *); @@ -31,5 +29,3 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, return result; } - -#endif
2003 Aug 04
0
Thread woes after 4.7 - 4.8 upgrade
...cps = 5 ns = 1040 addr = {sin_len = 0 '\000', sin_family = 2 '\002', sin_port = 34049, sin_addr = {s_addr = 0}, sin_zero = "\000\000\000\000\000\000\000"} readfds = {fds_bits = {32, 0, 0, 0, 0, 0, 0, 0, 0, 65536, 0 <repeats 22 times>}} writefds = {fds_bits = {0 <repeats 32 times>}} fp = (FILE *) 0x26980 on = 1 #4 0x280e22cc in _thread_start () at /usr/src/lib/libc_r/uthread/uthread_create.c:311 curthread = (struct pthread *) 0x80b99d4 #5 0x0 in ?? () No symbol table info available. (gdb) ----------------...
2013 Nov 12
0
[klibc:master] poll, select: fix style problems
.../klibc/select.c @@ -8,10 +8,10 @@ struct __pselect6; __extern int __pselect6(int, fd_set *, fd_set *, fd_set *, - const struct timespec *, const struct __pselect6 *); + const struct timespec *, const struct __pselect6 *); int select(int nfds, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds, struct timeval *timeout) + fd_set *exceptfds, struct timeval *timeout) { int result; struct timespec ts;
2004 Jul 12
2
[PATCH] Batch-mode rewrite
...iate "if ({read|write}_batch) batch_function_to_{read|write}_entire_datastructures()". Now, batch code is essentially de-coupled from the rest of rsync. Points of interaction are: 1) opening a batch file in main() 2) a hook in readfd() for writing batches from a receiver 3) a hook in writefd() for writing batches from a sender 4) file descriptor swaping in client_run() for reading batches 5) aborting the unneeded server in local_child() during a read_batch 6) a special-case for writing the protocol version during an rsyncd inband exchange 7) a special-case for writing the checks...
2006 Jan 09
2
performance with >50GB files
Hi all, today we had a performance issue transfering a big amount of data where one file was over 50GB. Rsync was tunneled over SSH and we expected the data to be synced within hours. However after over 10 hours the data is still not synced ... The sending box has rsync running with 60-80 % CPU load (2GHz Pentium 4) while the receiver is nearly idle. So far I had no acces to the poblematic