Re: svn commit: r236935 - head/sys/kern

2012-06-12 Thread Pawel Jakub Dawidek
On Tue, Jun 12, 2012 at 03:49:50PM +0200, Mateusz Guzik wrote: On Tue, Jun 12, 2012 at 01:43:35PM +0200, Pawel Jakub Dawidek wrote: On Tue, Jun 12, 2012 at 12:47:49PM +0200, Mateusz Guzik wrote: The problem is that fdalloc grows to at most fdp-fd_nfiles * 2, which still may not be enough

Re: svn commit: r236935 - head/sys/kern

2012-06-12 Thread Pawel Jakub Dawidek
On Tue, Jun 12, 2012 at 09:18:28PM +0200, Mateusz Guzik wrote: On Tue, Jun 12, 2012 at 06:01:29PM +0200, Pawel Jakub Dawidek wrote: Look good and you can just add 'In co-operation with: pjd'. One minor thing is that fd_first_free() can return 'size' if there are no free slots available

svn commit: r236891 - head/sys/kern

2012-06-11 Thread Pawel Jakub Dawidek
Author: pjd Date: Mon Jun 11 16:08:03 2012 New Revision: 236891 URL: http://svn.freebsd.org/changeset/base/236891 Log: Style fixes and simplifications. MFC after:1 month Modified: head/sys/kern/uipc_syscalls.c head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/uipc_syscalls.c

svn commit: r236910 - head/sys/kern

2012-06-11 Thread Pawel Jakub Dawidek
Author: pjd Date: Mon Jun 11 19:48:55 2012 New Revision: 236910 URL: http://svn.freebsd.org/changeset/base/236910 Log: Now that fdgrowtable() doesn't drop the filedesc lock we don't need to check if descriptor changed from under us. Replace the check with an assert. Discussed with:

svn commit: r236911 - head/sys/kern

2012-06-11 Thread Pawel Jakub Dawidek
Author: pjd Date: Mon Jun 11 19:51:27 2012 New Revision: 236911 URL: http://svn.freebsd.org/changeset/base/236911 Log: Move the code around a bit to move two parts of code duplicated from kern_close() close together. Discussed with: kib Tested by:pho MFC after:1 month

svn commit: r236912 - head/sys/kern

2012-06-11 Thread Pawel Jakub Dawidek
Author: pjd Date: Mon Jun 11 19:53:41 2012 New Revision: 236912 URL: http://svn.freebsd.org/changeset/base/236912 Log: Merge two ifs into one to make the code almost identical to the code in kern_close(). Discussed with: kib Tested by:pho MFC after:1 month Modified:

svn commit: r236914 - head/sys/kern

2012-06-11 Thread Pawel Jakub Dawidek
Author: pjd Date: Mon Jun 11 20:00:44 2012 New Revision: 236914 URL: http://svn.freebsd.org/changeset/base/236914 Log: Remove code duplicated in kern_close() and do_dup() and use closefp() function introduced a minute ago. This code duplication was responsible for the bug fixed in

svn commit: r236915 - head/sys/kern

2012-06-11 Thread Pawel Jakub Dawidek
Author: pjd Date: Mon Jun 11 20:01:50 2012 New Revision: 236915 URL: http://svn.freebsd.org/changeset/base/236915 Log: Be consistent with white spaces. MFC after:1 month Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c

Re: svn commit: r236909 - head/sbin/hastd

2012-06-11 Thread Pawel Jakub Dawidek
); } -error = clock_gettime(CLOCK_MONOTONIC, ts); + error = clock_gettime(CLOCK_REALTIME, ts); PJDLOG_ASSERT(error == 0); ts.tv_sec += timeout; error = pthread_cond_timedwait(cv, lock, ts); -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD

svn commit: r236917 - head/sys/kern

2012-06-11 Thread Pawel Jakub Dawidek
Author: pjd Date: Mon Jun 11 20:17:20 2012 New Revision: 236917 URL: http://svn.freebsd.org/changeset/base/236917 Log: Use consistent way of checking if descriptor number is valid. MFC after:1 month Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c

svn commit: r236918 - head/sys/sys

2012-06-11 Thread Pawel Jakub Dawidek
Author: pjd Date: Mon Jun 11 20:19:24 2012 New Revision: 236918 URL: http://svn.freebsd.org/changeset/base/236918 Log: Use consistent way of checking if descriptor number is valid. MFC after:1 month Modified: head/sys/sys/filedesc.h Modified: head/sys/sys/filedesc.h

svn commit: r236935 - head/sys/kern

2012-06-11 Thread Pawel Jakub Dawidek
Author: pjd Date: Mon Jun 11 22:05:26 2012 New Revision: 236935 URL: http://svn.freebsd.org/changeset/base/236935 Log: fdgrowtable() no longer drops the filedesc lock so it is enough to retry finding free file descriptor only once after fdgrowtable(). Spotted by: pluknet MFC after:

svn commit: r236832 - head/sys/kern

2012-06-10 Thread Pawel Jakub Dawidek
Author: pjd Date: Sun Jun 10 06:31:54 2012 New Revision: 236832 URL: http://svn.freebsd.org/changeset/base/236832 Log: Simplify fdtofp(). MFC after:1 month Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c

svn commit: r236849 - head/sys/kern

2012-06-10 Thread Pawel Jakub Dawidek
Author: pjd Date: Sun Jun 10 13:10:21 2012 New Revision: 236849 URL: http://svn.freebsd.org/changeset/base/236849 Log: Merge two ifs into one. Other minor style fixes. MFC after:1 month Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c

svn commit: r236853 - head/sys/kern

2012-06-10 Thread Pawel Jakub Dawidek
Author: pjd Date: Sun Jun 10 14:57:18 2012 New Revision: 236853 URL: http://svn.freebsd.org/changeset/base/236853 Log: When we are closing capability during dup2(), we want to call mq_fdclose() on the underlying object and not on the capability itself. Discussed with: rwatson

svn commit: r236858 - head/sys/kern

2012-06-10 Thread Pawel Jakub Dawidek
Author: pjd Date: Sun Jun 10 20:22:10 2012 New Revision: 236858 URL: http://svn.freebsd.org/changeset/base/236858 Log: Style: move opt_*.h includes in the proper place. MFC after:1 month Modified: head/sys/kern/sys_capability.c Modified: head/sys/kern/sys_capability.c

svn commit: r236859 - head/sys/kern

2012-06-10 Thread Pawel Jakub Dawidek
Author: pjd Date: Sun Jun 10 20:24:01 2012 New Revision: 236859 URL: http://svn.freebsd.org/changeset/base/236859 Log: Remove redundant include. MFC after:1 month Modified: head/sys/kern/subr_trap.c Modified: head/sys/kern/subr_trap.c

svn commit: r236812 - head/sys/kern

2012-06-09 Thread Pawel Jakub Dawidek
Author: pjd Date: Sat Jun 9 12:27:30 2012 New Revision: 236812 URL: http://svn.freebsd.org/changeset/base/236812 Log: Correct panic message. MFC after:1 month MFC with: r236731 Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c

svn commit: r236820 - head/sys/kern

2012-06-09 Thread Pawel Jakub Dawidek
Author: pjd Date: Sat Jun 9 18:03:23 2012 New Revision: 236820 URL: http://svn.freebsd.org/changeset/base/236820 Log: Make some of the loops more readable. Reviewed by: tegge MFC after:1 month Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c

svn commit: r236821 - head/sys/kern

2012-06-09 Thread Pawel Jakub Dawidek
Author: pjd Date: Sat Jun 9 18:48:06 2012 New Revision: 236821 URL: http://svn.freebsd.org/changeset/base/236821 Log: Remove now unused variable. MFC after:1 month MFC with: r236820 Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c

svn commit: r236822 - head/sys/kern

2012-06-09 Thread Pawel Jakub Dawidek
Author: pjd Date: Sat Jun 9 18:50:32 2012 New Revision: 236822 URL: http://svn.freebsd.org/changeset/base/236822 Log: There is no need to drop the FILEDESC lock around malloc(M_WAITOK) anymore, as we now use sx lock for filedesc structure protection. Reviewed by: kib MFC after:1

svn commit: r236823 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2012-06-09 Thread Pawel Jakub Dawidek
Author: pjd Date: Sat Jun 9 20:16:19 2012 New Revision: 236823 URL: http://svn.freebsd.org/changeset/base/236823 Log: ds_guid of 0 is special, as it is used by snapshot receive code to differentiate between an incremental and full stream. Be sure not to generate guid equal to 0.

svn commit: r236727 - head/sys/kern

2012-06-07 Thread Pawel Jakub Dawidek
Author: pjd Date: Thu Jun 7 22:49:09 2012 New Revision: 236727 URL: http://svn.freebsd.org/changeset/base/236727 Log: Plug file reference leak in capability failure case. Sponsored by: FreeBSD Foundation MFC after:3 days Modified: head/sys/kern/tty.c Modified:

svn commit: r236730 - head/sys/kern

2012-06-07 Thread Pawel Jakub Dawidek
Author: pjd Date: Thu Jun 7 23:08:18 2012 New Revision: 236730 URL: http://svn.freebsd.org/changeset/base/236730 Log: Eliminate redundant variable. Sponsored by: FreeBSD Foundation MFC after:1 week Modified: head/sys/kern/tty.c Modified: head/sys/kern/tty.c

svn commit: r236731 - head/sys/kern

2012-06-07 Thread Pawel Jakub Dawidek
Author: pjd Date: Thu Jun 7 23:33:10 2012 New Revision: 236731 URL: http://svn.freebsd.org/changeset/base/236731 Log: In fdalloc() f_ofileflags for the newly allocated descriptor has to be 0. Assert that instead of setting it to 0. Sponsored by: FreeBSD Foundation MFC after:1

Re: svn commit: r236582 - head/lib/libc/stdlib

2012-06-05 Thread Pawel Jakub Dawidek
should probably agree on some global rule here. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpFISCr9twym.pgp Description: PGP signature

svn commit: r236507 - head/sbin/hastd

2012-06-03 Thread Pawel Jakub Dawidek
Author: pjd Date: Sun Jun 3 10:50:46 2012 New Revision: 236507 URL: http://svn.freebsd.org/changeset/base/236507 Log: Simplify the code by using snprlcat(). MFC after:3 days Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c

svn commit: r236360 - head/sys/kern

2012-05-31 Thread Pawel Jakub Dawidek
Author: pjd Date: Thu May 31 19:31:28 2012 New Revision: 236360 URL: http://svn.freebsd.org/changeset/base/236360 Log: There is no rmdirat system call. Weird, I know. MFC after:3 days Modified: head/sys/kern/capabilities.conf Modified: head/sys/kern/capabilities.conf

svn commit: r236361 - head/sys/kern

2012-05-31 Thread Pawel Jakub Dawidek
Author: pjd Date: Thu May 31 19:32:37 2012 New Revision: 236361 URL: http://svn.freebsd.org/changeset/base/236361 Log: Add missing system calls. MFC after:3 days Modified: head/sys/kern/capabilities.conf Modified: head/sys/kern/capabilities.conf

svn commit: r236363 - head/sys/kern

2012-05-31 Thread Pawel Jakub Dawidek
Author: pjd Date: Thu May 31 19:34:53 2012 New Revision: 236363 URL: http://svn.freebsd.org/changeset/base/236363 Log: Regenerate after r236361. MFC after:3 days Modified: head/sys/kern/init_sysent.c Modified: head/sys/kern/init_sysent.c

svn commit: r236248 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2012-05-29 Thread Pawel Jakub Dawidek
Author: pjd Date: Tue May 29 18:05:24 2012 New Revision: 236248 URL: http://svn.freebsd.org/changeset/base/236248 Log: Remove unused variable. MFC after:3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Modified:

svn commit: r236250 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2012-05-29 Thread Pawel Jakub Dawidek
Author: pjd Date: Tue May 29 18:11:45 2012 New Revision: 236250 URL: http://svn.freebsd.org/changeset/base/236250 Log: Tighten up the assertion: because size can't be 0 and even if sm_space is equal to sm_size, any 'sm_space - size' will be less than sm_size. MFC after:3 days

svn commit: r236013 - head/cddl/contrib/opensolaris/cmd/zfs

2012-05-25 Thread Pawel Jakub Dawidek
Author: pjd Date: Fri May 25 17:19:30 2012 New Revision: 236013 URL: http://svn.freebsd.org/changeset/base/236013 Log: Correct error message. MFC after:3 days Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c

Re: svn commit: r235852 - head/sys/geom

2012-05-23 Thread Pawel Jakub Dawidek
-sl_start) / 1024); BTW, %jx is also uintmax_t, not intmax_t, right? -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpfk8kMZKDtW.pgp Description

Re: svn commit: r235478 - head/cddl/contrib/opensolaris/cmd/zpool

2012-05-20 Thread Pawel Jakub Dawidek
*)); - searchdirs[0] = /dev/dsk; + searchdirs[0] = /dev; nsearch = 1; } -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am

Re: svn commit: r235129 - head/tools/tools/zfsboottest

2012-05-07 Thread Pawel Jakub Dawidek
}` != legacy ]; then -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpGdAPmuhQHd.pgp Description: PGP signature

Re: svn commit: r233435 - head/etc/mtree

2012-05-04 Thread Pawel Jakub Dawidek
a shame it was merged into 7, 8 and 9. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgp0mYBHxmz4C.pgp Description: PGP signature

svn commit: r234654 - head/cddl/contrib/opensolaris/cmd/zfs

2012-04-24 Thread Pawel Jakub Dawidek
Author: pjd Date: Tue Apr 24 13:44:46 2012 New Revision: 234654 URL: http://svn.freebsd.org/changeset/base/234654 Log: Add -u option to 'zfs create' that prevents file system from being automatically mounted. This is similar to the 'zfs receive -u'. MFC after:1 week Modified:

Re: svn commit: r234482 - in head/sys: fs/msdosfs fs/nfsserver kern sys

2012-04-22 Thread Pawel Jakub Dawidek
vnode interlock to be held during v_actfreelist manipulation then why can't we use interlock+vnode_free_list_mtx when operating on the free list and interlock+per-mountpoint-lock when operating on mnt_activevnodelist? -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD

Re: svn commit: r232209 - in head: lib/libthr/thread sys/kern

2012-03-19 Thread Pawel Jakub Dawidek
On Sun, Mar 18, 2012 at 05:56:02PM -0700, Julian Elischer wrote: On 3/18/12 11:50 AM, Pawel Jakub Dawidek wrote: On Mon, Feb 27, 2012 at 01:38:52PM +, David Xu wrote: Author: davidxu Date: Mon Feb 27 13:38:52 2012 New Revision: 232209 URL: http://svn.freebsd.org/changeset/base

Re: svn commit: r232209 - in head: lib/libthr/thread sys/kern

2012-03-19 Thread Pawel Jakub Dawidek
On Mon, Mar 19, 2012 at 04:16:58PM +0800, David Xu wrote: Revision 233134 should have fixed the problem. http://svn.freebsd.org/changeset/base/233134 Works now, thanks for the quick fix. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer

Re: svn commit: r232209 - in head: lib/libthr/thread sys/kern

2012-03-18 Thread Pawel Jakub Dawidek
pthread_condattr_setclock(attr, CLOCK_MONOTONIC) is no-op. If you change CLOCK_MONOTONIC to CLOCK_REALTIME in clock_gettime(2) call, it will timeout after 10 seconds. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http

svn commit: r232574 - head/lib/libc/sys

2012-03-05 Thread Pawel Jakub Dawidek
Author: pjd Date: Mon Mar 5 20:59:34 2012 New Revision: 232574 URL: http://svn.freebsd.org/changeset/base/232574 Log: Link EV_SET(3) to kqueue(2). MFC after:3 days Modified: head/lib/libc/sys/Makefile.inc Modified: head/lib/libc/sys/Makefile.inc

Re: svn commit: r232181 - in head/sys: kern sys

2012-02-27 Thread Pawel Jakub Dawidek
... weird. What's the purpose of this change? -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpOAtpTKDSAc.pgp Description: PGP signature

Re: svn commit: r232181 - in head/sys: kern sys

2012-02-27 Thread Pawel Jakub Dawidek
On Mon, Feb 27, 2012 at 10:49:59AM +0200, Mikolaj Golub wrote: On Mon, 27 Feb 2012 09:28:11 +0100 Pawel Jakub Dawidek wrote: PJD On Sun, Feb 26, 2012 at 02:25:48PM +, Mikolaj Golub wrote: Author: trociny Date: Sun Feb 26 14:25:48 2012 New Revision: 232181 URL: http

Re: svn commit: r232059 - in head: sys/fs/devfs sys/fs/nullfs sys/kern sys/sys usr.sbin/jail

2012-02-25 Thread Pawel Jakub Dawidek
... -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpXl06vaJ0Vg.pgp Description: PGP signature

Re: svn commit: r232147 - head/sys/dev/wi

2012-02-25 Thread Pawel Jakub Dawidek
wi_softc *sc) le16toh(ltbuf[1]), le16toh(ltbuf[0]))); break; } +finish: CSR_WRITE_2(sc, WI_EVENT_ACK, WI_EV_INFO); } Can't you just 'break' instead of using goto? -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD

svn commit: r231945 - head/lib/libc/gen

2012-02-20 Thread Pawel Jakub Dawidek
Author: pjd Date: Mon Feb 20 20:46:27 2012 New Revision: 231945 URL: http://svn.freebsd.org/changeset/base/231945 Log: Document the fact that getgrouplist(3) returns 0 on success. MFC after:3 days Modified: head/lib/libc/gen/getgrouplist.3 Modified: head/lib/libc/gen/getgrouplist.3

Re: svn commit: r231814 - in head/sys: kern sys

2012-02-17 Thread Pawel Jakub Dawidek
On Fri, Feb 17, 2012 at 01:07:26AM -0800, Julian Elischer wrote: On 2/17/12 12:58 AM, Pawel Jakub Dawidek wrote: I agree with everything except for per-CPU buffers. I understand the need for using printf in low-level code and it indeed complicates things. The reason I don't like the idea

Re: svn commit: r231814 - in head/sys: kern sys

2012-02-17 Thread Pawel Jakub Dawidek
there? I don't expect printf should be fast, so it might be ok. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpeHTgBnCfOi.pgp Description: PGP

Re: svn commit: r230869 - head/usr.sbin/daemon

2012-02-12 Thread Pawel Jakub Dawidek
with writing to pidfile, but don't treat it as critial error. We can also add such a warning to the example in the manual page. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am

Re: svn commit: r230869 - head/usr.sbin/daemon

2012-02-12 Thread Pawel Jakub Dawidek
are desired functionalities. I don't object strongly against them, but having my name there suggests we reached some consensus and we didn't:) -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am

svn commit: r231525 - head/sbin/hastd

2012-02-11 Thread Pawel Jakub Dawidek
Author: pjd Date: Sat Feb 11 16:41:52 2012 New Revision: 231525 URL: http://svn.freebsd.org/changeset/base/231525 Log: Nice range comparison. MFC after:3 days Modified: head/sbin/hastd/rangelock.c Modified: head/sbin/hastd/rangelock.c

Re: svn commit: r231269 - head/sys/fs/nullfs

2012-02-09 Thread Pawel Jakub Dawidek
similar. Changes like this one, which can have serious security implications, should be really properly reviewed. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am

svn commit: r231192 - head/lib/libutil

2012-02-08 Thread Pawel Jakub Dawidek
Author: pjd Date: Wed Feb 8 08:43:41 2012 New Revision: 231192 URL: http://svn.freebsd.org/changeset/base/231192 Log: Note that calling pidfile_write(3) multiple times is fine. MFC after:3 days Modified: head/lib/libutil/pidfile.3 Modified: head/lib/libutil/pidfile.3

svn commit: r231193 - head/lib/libutil

2012-02-08 Thread Pawel Jakub Dawidek
Author: pjd Date: Wed Feb 8 08:49:30 2012 New Revision: 231193 URL: http://svn.freebsd.org/changeset/base/231193 Log: Add a comment to the example that pidfile_* functions can handle pfh being NULL. MFC after:3 days Modified: head/lib/libutil/pidfile.3 Modified:

Re: svn commit: r230869 - head/usr.sbin/daemon

2012-02-08 Thread Pawel Jakub Dawidek
On Wed, Feb 08, 2012 at 10:32:41AM +0200, Mikolaj Golub wrote: On Mon, 6 Feb 2012 23:17:43 +0100 Pawel Jakub Dawidek wrote: PJD On Mon, Feb 06, 2012 at 11:46:24PM +0200, Mikolaj Golub wrote: Thanks. The updated version is attached. PJD Looks good to me. Thanks. But I still think

svn commit: r231195 - head/sys/kern

2012-02-08 Thread Pawel Jakub Dawidek
Author: pjd Date: Wed Feb 8 09:18:22 2012 New Revision: 231195 URL: http://svn.freebsd.org/changeset/base/231195 Log: Allow to set kern.ipc.shmmax from /boot/loader.conf. MFC after:1 week Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c

svn commit: r231130 - head/sys/net

2012-02-07 Thread Pawel Jakub Dawidek
Author: pjd Date: Tue Feb 7 14:50:33 2012 New Revision: 231130 URL: http://svn.freebsd.org/changeset/base/231130 Log: Allow to set if_bridge(4) sysctls from /boot/loader.conf. MFC after:3 days Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c

Re: svn commit: r230869 - head/usr.sbin/daemon

2012-02-06 Thread Pawel Jakub Dawidek
On Mon, Feb 06, 2012 at 09:39:47AM +0200, Mikolaj Golub wrote: On Sun, 5 Feb 2012 22:46:48 +0100 Pawel Jakub Dawidek wrote: PJD On Sun, Feb 05, 2012 at 11:27:10PM +0200, Mikolaj Golub wrote: Ok, using hastd code as a reference :-) here is my implementation. PJD - I'd not pass

Re: svn commit: r231087 - head/lib/libutil

2012-02-06 Thread Pawel Jakub Dawidek
) and not pidfile(3). -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpG6c5dvlujF.pgp Description: PGP signature

Re: svn commit: r230869 - head/usr.sbin/daemon

2012-02-06 Thread Pawel Jakub Dawidek
regardless of whether daemon(8) hangs around to wait for the child exit. My expectation is that as long as parent process holds pidfile descriptor open and locked, the pidfile should remain locked even after fork(2)/execve(2). Worth checking, though. -- Pawel Jakub Dawidek http

Re: svn commit: r230869 - head/usr.sbin/daemon

2012-02-06 Thread Pawel Jakub Dawidek
On Mon, Feb 06, 2012 at 11:46:24PM +0200, Mikolaj Golub wrote: On Mon, 6 Feb 2012 09:27:06 +0100 Pawel Jakub Dawidek wrote: PJD For the patch itself. PJD You don't have to have two separate cases depending on request for PJD pidfile. You can specify NULL pfh to the pidfile functions

Re: svn commit: r230869 - head/usr.sbin/daemon

2012-02-05 Thread Pawel Jakub Dawidek
Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpbLwNve4Rfr.pgp Description: PGP signature

Re: svn commit: r230869 - head/usr.sbin/daemon

2012-02-05 Thread Pawel Jakub Dawidek
On Sat, Feb 04, 2012 at 10:32:56AM -0600, Guy Helmer wrote: On Feb 4, 2012, at 1:42 AM, Pawel Jakub Dawidek wrote: On Wed, Feb 01, 2012 at 04:41:00PM +, Guy Helmer wrote: Author: ghelmer Date: Wed Feb 1 16:40:59 2012 New Revision: 230869 URL: http://svn.freebsd.org/changeset

Re: svn commit: r230869 - head/usr.sbin/daemon

2012-02-05 Thread Pawel Jakub Dawidek
On Sun, Feb 05, 2012 at 04:46:53AM -0800, Doug Barton wrote: On 02/05/2012 01:59, Pawel Jakub Dawidek wrote: I seem to miss positives of the other approach. Leaving stale PIDs in pidfile is something we should avoid at all costs, so recommending that in the manual page is not the best

Re: svn commit: r230869 - head/usr.sbin/daemon

2012-02-05 Thread Pawel Jakub Dawidek
fork(2) and pidfile_write(3). This way pidfiles will always be created with root privileges and we can forget about all the mess with pid directories, etc. - With the above you can wait for child to exit with simple wait(2). -- Pawel Jakub Dawidek http

svn commit: r230996 - head/sys/conf

2012-02-04 Thread Pawel Jakub Dawidek
Author: pjd Date: Sat Feb 4 20:17:07 2012 New Revision: 230996 URL: http://svn.freebsd.org/changeset/base/230996 Log: After multiple requests for back out, after multiple promisses from adrian@ to fix it (without fixing it), after making one of my servers unbootable, after now making also

svn commit: r230976 - head/sbin/hastd

2012-02-03 Thread Pawel Jakub Dawidek
Author: pjd Date: Sat Feb 4 07:59:12 2012 New Revision: 230976 URL: http://svn.freebsd.org/changeset/base/230976 Log: Fix typo in comment. MFC after:3 days Modified: head/sbin/hastd/parse.y Modified: head/sbin/hastd/parse.y

Re: svn commit: r230623 - in head/sys: amd64/amd64 cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs sys vm

2012-01-28 Thread Pawel Jakub Dawidek
including UMA now entails the addition of a single flag to kmem_alloc or uma zone create M_NODUMP and UMA_ZONE_NODUMP are very useful, not only for ZFS. I'll look into using it for GELI memory used to store keys. Could you please document those flags in malloc(9) and uma(9)? -- Pawel Jakub Dawidek

Re: svn commit: r230623 - in head/sys: amd64/amd64 cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs sys vm

2012-01-28 Thread Pawel Jakub Dawidek
that will prevent dumping the memory and that will clear memory on free. How hard would that be? -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl

Re: svn commit: r230623 - in head/sys: amd64/amd64 cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs sys vm

2012-01-28 Thread Pawel Jakub Dawidek
On Sat, Jan 28, 2012 at 01:36:05PM +0100, K Macy wrote: Il giorno 28/gen/2012, alle ore 09:39, Pawel Jakub Dawidek p...@freebsd.org ha scritto: How do you handle the case when there are two small allocations within one page, where one has the NODUMP flag and one doesn't have the flag

svn commit: r230515 - head/sbin/hastd

2012-01-24 Thread Pawel Jakub Dawidek
(r230514) +++ head/sbin/hastd/hast.conf.5 Tue Jan 24 23:43:13 2012(r230515) @@ -1,8 +1,8 @@ .\ Copyright (c) 2010 The FreeBSD Foundation -.\ Copyright (c) 2010-2011 Pawel Jakub Dawidek pa...@dawidek.net +.\ Copyright (c) 2010-2012 Pawel Jakub Dawidek pa...@dawidek.net .\ All rights

svn commit: r230454 - head/sys/cddl/compat/opensolaris/sys

2012-01-22 Thread Pawel Jakub Dawidek
Author: pjd Date: Sun Jan 22 10:58:17 2012 New Revision: 230454 URL: http://svn.freebsd.org/changeset/base/230454 Log: Use provided name when allocating ksid domain. It isn't really used on FreeBSD, but should fix a panic when pool is imported from another OS that is using this. MFC

svn commit: r230455 - in head/sys: arm/arm kern

2012-01-22 Thread Pawel Jakub Dawidek
Author: pjd Date: Sun Jan 22 11:01:36 2012 New Revision: 230455 URL: http://svn.freebsd.org/changeset/base/230455 Log: TDF_* flags should be used with td_flags field and TDP_* flags should be used with td_pflags field. Correct two places where it was not the case. Discussed with:

svn commit: r230456 - head/lib/libc/sys

2012-01-22 Thread Pawel Jakub Dawidek
Author: pjd Date: Sun Jan 22 11:15:48 2012 New Revision: 230456 URL: http://svn.freebsd.org/changeset/base/230456 Log: The sys/uio.h header is needed only for readv(2), preadv(2), writev(2) and pwritev(2). Document it more precisely. Reviewed by: jilles MFC after:3 days Modified:

svn commit: r230457 - head/sbin/hastd

2012-01-22 Thread Pawel Jakub Dawidek
Author: pjd Date: Sun Jan 22 11:20:42 2012 New Revision: 230457 URL: http://svn.freebsd.org/changeset/base/230457 Log: Free memory that won't be used in child. MFC after:1 week Modified: head/sbin/hastd/hastd.c Modified: head/sbin/hastd/hastd.c

Re: svn commit: r230307 - in head: lib/libfetch usr.bin/fetch

2012-01-21 Thread Pawel Jakub Dawidek
; + buf+= total; Style nit (missing space before +=). -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpYHPSr3wwP9.pgp Description

Re: svn commit: r229800 - head/sys/conf

2012-01-21 Thread Pawel Jakub Dawidek
On Sun, Jan 08, 2012 at 02:58:56PM -0800, Adrian Chadd wrote: On 8 January 2012 02:43, Pawel Jakub Dawidek p...@freebsd.org wrote: If someone is actually using GENERIC kernel. This change will break all my system next time I upgrade. Adding UFS_ACL option to the kernel config to make ZFS

svn commit: r230436 - head/sbin/hastd

2012-01-21 Thread Pawel Jakub Dawidek
Author: pjd Date: Sat Jan 21 20:13:37 2012 New Revision: 230436 URL: http://svn.freebsd.org/changeset/base/230436 Log: Fix minor memory leak. MFC after:3 days Modified: head/sbin/hastd/parse.y Modified: head/sbin/hastd/parse.y

svn commit: r230438 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/...

2012-01-21 Thread Pawel Jakub Dawidek
@@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 Pawel Jakub Dawidek pa...@dawidek.net. + * All rights reserved. */ #include libintl.h @@ -129,8 +131,11 @@ zfs_callback(zfs_handle_t *zhp, void *da cb-cb_depth

svn commit: r230395 - head/sbin/hastd

2012-01-20 Thread Pawel Jakub Dawidek
Author: pjd Date: Fri Jan 20 21:45:24 2012 New Revision: 230395 URL: http://svn.freebsd.org/changeset/base/230395 Log: Remove unused token 'port'. MFC after:3 days Modified: head/sbin/hastd/parse.y head/sbin/hastd/token.l Modified: head/sbin/hastd/parse.y

svn commit: r230396 - head/sbin/hastd

2012-01-20 Thread Pawel Jakub Dawidek
Author: pjd Date: Fri Jan 20 21:49:56 2012 New Revision: 230396 URL: http://svn.freebsd.org/changeset/base/230396 Log: Remove another unused token. MFC after:3 days Modified: head/sbin/hastd/parse.y Modified: head/sbin/hastd/parse.y

svn commit: r230397 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2012-01-20 Thread Pawel Jakub Dawidek
Author: pjd Date: Fri Jan 20 22:04:59 2012 New Revision: 230397 URL: http://svn.freebsd.org/changeset/base/230397 Log: By default turn off prefetch when listing snapshots. In my tests it makes listing snapshots 19% faster with cold cache and 47% faster with warm cache. MFC after:1

Re: svn commit: r230037 - head/lib/libutil

2012-01-16 Thread Pawel Jakub Dawidek
, int _some_other_argument); when line exceeds 80 chars. Especially this one looks very strange: properties properties_read(int _fd); -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I

Re: svn commit: r230037 - head/lib/libutil

2012-01-14 Thread Pawel Jakub Dawidek
are harder to read). I'd prefer not to change that. All those functions are part of pidfile(3) API and it would be better, IMHO, to keep them together here too. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am

svn commit: r230092 - head/sbin/hastd

2012-01-13 Thread Pawel Jakub Dawidek
Author: pjd Date: Fri Jan 13 23:25:35 2012 New Revision: 230092 URL: http://svn.freebsd.org/changeset/base/230092 Log: Style cleanups. MFC after:3 days Modified: head/sbin/hastd/secondary.c Modified: head/sbin/hastd/secondary.c

Re: svn commit: r229966 - head/lib/libutil

2012-01-11 Thread Pawel Jakub Dawidek
* to the proper descriptor. */ -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpiiMweQxbbw.pgp Description: PGP signature

Re: svn commit: r229908 - head/usr.bin/brandelf

2012-01-10 Thread Pawel Jakub Dawidek
) -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpvOFuGp1aVs.pgp Description: PGP signature

Re: svn commit: r229936 - head/lib/libutil

2012-01-10 Thread Pawel Jakub Dawidek
); + } + /* * Remember file information, so in pidfile_write() we are sure we write * to the proper descriptor. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am

Re: svn commit: r229936 - head/lib/libutil

2012-01-10 Thread Pawel Jakub Dawidek
On Tue, Jan 10, 2012 at 10:25:26PM +0100, Pawel Jakub Dawidek wrote: On Tue, Jan 10, 2012 at 06:43:27PM +, Guy Helmer wrote: Author: ghelmer Date: Tue Jan 10 18:43:27 2012 New Revision: 229936 URL: http://svn.freebsd.org/changeset/base/229936 Log: Set the FD_CLOEXEC flag

Re: svn commit: r229937 - in head/lib: libc/gen libutil

2012-01-10 Thread Pawel Jakub Dawidek
); +} BTW. If you are working on pidfile, it would be nice to move pidfile structure declaration into pidfile.c. There is no need to expose it. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am

Re: svn commit: r229937 - in head/lib: libc/gen libutil

2012-01-10 Thread Pawel Jakub Dawidek
On Tue, Jan 10, 2012 at 03:52:35PM -0600, Guy Helmer wrote: On Jan 10, 2012, at 3:42 PM, Pawel Jakub Dawidek wrote: On Tue, Jan 10, 2012 at 07:53:25PM +, Guy Helmer wrote: Author: ghelmer Date: Tue Jan 10 19:53:25 2012 New Revision: 229937 URL: http://svn.freebsd.org/changeset

Re: svn commit: r229937 - in head/lib: libc/gen libutil

2012-01-10 Thread Pawel Jakub Dawidek
pidfile_fileno(struct pidfh *pfh); #endif #ifdef _UFS_UFS_QUOTA_H_ One more thing. You also need to add link in Makefile, so that 'man pidfile_fileno' will work. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am

svn commit: r229944 - head/sbin/hastd

2012-01-10 Thread Pawel Jakub Dawidek
Author: pjd Date: Tue Jan 10 22:24:57 2012 New Revision: 229944 URL: http://svn.freebsd.org/changeset/base/229944 Log: Don't touch pidfiles when running in foreground. Before that change we would create an empty pidfile on start and check if it changed on SIGHUP. MFC after:3 days

svn commit: r229945 - in head/sbin: hastctl hastd

2012-01-10 Thread Pawel Jakub Dawidek
Author: pjd Date: Tue Jan 10 22:39:07 2012 New Revision: 229945 URL: http://svn.freebsd.org/changeset/base/229945 Log: For functions that return -1 on failure check exactly for -1 and not for any negative number. MFC after:3 days Modified: head/sbin/hastctl/hastctl.c

svn commit: r229946 - head/sbin/hastd

2012-01-10 Thread Pawel Jakub Dawidek
Author: pjd Date: Tue Jan 10 22:41:09 2012 New Revision: 229946 URL: http://svn.freebsd.org/changeset/base/229946 Log: - Fix a bug where pidfile was removed in SIGHUP when it hasn't changed in configuration file. - Log the fact that pidfile has changed. MFC after:3 days

Re: svn commit: r229945 - in head/sbin: hastctl hastd

2012-01-10 Thread Pawel Jakub Dawidek
On Tue, Jan 10, 2012 at 02:43:29PM -0800, Doug Barton wrote: On 01/10/2012 14:39, Pawel Jakub Dawidek wrote: For functions that return -1 on failure check exactly for -1 and not for any negative number. what is the likelihood that at some point in the future the semantics for those

Re: svn commit: r229800 - head/sys/conf

2012-01-09 Thread Pawel Jakub Dawidek
On Mon, Jan 09, 2012 at 08:15:44AM -0500, John Baldwin wrote: On Sunday, January 08, 2012 5:43:30 am Pawel Jakub Dawidek wrote: On Sun, Jan 08, 2012 at 12:55:22AM +, Adrian Chadd wrote: Author: adrian Date: Sun Jan 8 00:55:22 2012 New Revision: 229800 URL: http

Re: svn commit: r229800 - head/sys/conf

2012-01-08 Thread Pawel Jakub Dawidek
image) just enough to actually fit. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpwOEHNmkx4H.pgp Description: PGP signature

<    1   2   3   4   5   6   7   8   9   10   >