Re: Failsafe on kernel panic

2013-01-20 Thread Willem Jan Withagen
On 17-1-2013 4:18, Ian Lepore wrote: On Wed, 2013-01-16 at 23:27 +0200, Sami Halabi wrote: Thank you for your response, very helpful. one question - how do i configure auto-reboot once kernel panic occurs? Sami From src/sys/conf/NOTES, this may be what you're looking for... # # Don't

ZFS regimen: scrub, scrub, scrub and scrub again.

2013-01-20 Thread Zaphod Beeblebrox
Please don't misinterpret this post: ZFS's ability to recover from fairly catastrophic failures is pretty stellar, but I'm wondering if there can be a little room for improvement. I use RAID pretty much everywhere. I don't like to loose data and disks are cheap. I have a fair amount of

How to validate the variable size memory block in ioctl handler?

2013-01-20 Thread Yuri
I am implementing an ioctl that reads/writes variable size structure. Allocated size is supplied by the caller in the structure itself. struct my_struct { int len; // allocated size other_struct s[1]; }; ioctl request id is defined as _IOWR('X', number, my_struct) How to validate from the

Re: How to validate the variable size memory block in ioctl handler?

2013-01-20 Thread mdf
On Sun, Jan 20, 2013 at 3:01 PM, Yuri y...@rawbw.com wrote: I am implementing an ioctl that reads/writes variable size structure. Allocated size is supplied by the caller in the structure itself. struct my_struct { int len; // allocated size other_struct s[1]; }; ioctl request id is

Re: How to validate the variable size memory block in ioctl handler?

2013-01-20 Thread Yuri
On 01/20/2013 16:59, m...@freebsd.org wrote: To do what you want it sounds like you want your handler to take something like: struct var_ioctl { int len; void *data; }; Then then handler itself would have to use copyin/copyout to access the data. There's no simpler way. I think I

Re: How to validate the variable size memory block in ioctl handler?

2013-01-20 Thread mdf
On Sun, Jan 20, 2013 at 6:50 PM, Yuri y...@rawbw.com wrote: On 01/20/2013 16:59, m...@freebsd.org wrote: To do what you want it sounds like you want your handler to take something like: struct var_ioctl { int len; void *data; }; Then then handler itself would have to use

Re: How to validate the variable size memory block in ioctl handler?

2013-01-20 Thread Yuri
On 01/20/2013 19:15, m...@freebsd.org wrote: This would be fine for a local patch but it breaks existing (valid) uses that have exactly 8191 bytes of data, so it wouldn't be suitable for the main FreeBSD repository. Also, in general one wants to have limits on syscalls that can force a kernel

Re: ZFS regimen: scrub, scrub, scrub and scrub again.

2013-01-20 Thread Attila Nagy
Hi, On 01/20/13 23:26, Zaphod Beeblebrox wrote: 1) a pause for scrub... such that long scrubs could be paused during working hours. While not exactly pause, but isn't playing with scrub_delay works here? vfs.zfs.scrub_delay: Number of ticks to delay scrub Set this to a high value during