Re: retry mounting with ro when rw fails

2011-04-08 Thread Andriy Gapon
on 08/04/2011 03:00 Jeremy Chadwick said the following: On Thu, Apr 07, 2011 at 01:20:53PM -0700, Garrett Cooper wrote: On Thu, Apr 7, 2011 at 10:25 AM, Andriy Gapon a...@freebsd.org wrote: [sorry for double post, it should have been hackers not hardware] Guys, could you please review and

Re: retry mounting with ro when rw fails

2011-04-08 Thread Andriy Gapon
on 08/04/2011 05:16 Garrett Cooper said the following: Yeah. It seems like something else like EINVAL (just an example -- probably a bad one) would be better. Also, please be careful as returning ENODEV seems to be UFS-specific: I wonder how you arrived at that conclusion. See intro(2) or

Re: retry mounting with ro when rw fails

2011-04-08 Thread Andriy Gapon
on 07/04/2011 23:20 Garrett Cooper said the following: As a generic question / observation, maybe we should just implement 'errors=remount-ro' (or a reasonable facsimile) like Linux has in our mount(8) command? Doesn't look like NetBSD, OpenBSD, or [Open]Solaris sported similar

Re: retry mounting with ro when rw fails

2011-04-08 Thread Bruce Evans
On Fri, 8 Apr 2011, Andriy Gapon wrote: on 08/04/2011 03:00 Jeremy Chadwick said the following: On Thu, Apr 07, 2011 at 01:20:53PM -0700, Garrett Cooper wrote: As a generic question / observation, maybe we should just implement 'errors=remount-ro' (or a reasonable facsimile) like Linux

ifconfig output: ipv4 netmask format

2011-04-08 Thread Sergey Vinogradov
Hi, hackers. I have a question: why ipv4 netmask is displayed by ifconfig in hex format? Isn't dot-decimal notation more human-readable? Will the attached patch break something in the very bad way? -- wbr, Boo --- af_inet.c.orig 2011-04-07 18:48:28.850931143 +0400 +++ af_inet.c

RE: retry mounting with ro when rw fails

2011-04-08 Thread Andrew Duane
I had been letting this discussion settle a little bit before jumping in, but we've done some work in this area for a few of our platforms. The work was rather ham-fisted, but I've been looking for a way to try to get it cleaned up and back to FreeBSD. Basically, we have a way of detecting

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Daniel Gerzo
On Fri, 08 Apr 2011 16:08:38 +0400, Sergey Vinogradov wrote: Hi, hackers. I have a question: why ipv4 netmask is displayed by ifconfig in hex format? Isn't dot-decimal notation more human-readable? Will the attached patch break something in the very bad way? At least, it may break some

Re: retry mounting with ro when rw fails

2011-04-08 Thread Andriy Gapon
on 08/04/2011 15:20 Bruce Evans said the following: But the default behaviour is backwards, especially for read-mostly removable media. The default should be ro, possibly with an automagic upgrade to rw iff the media really needs to be written too. Writing timestamps for file system and

Re: retry mounting with ro when rw fails

2011-04-08 Thread Andriy Gapon
on 08/04/2011 15:36 Andrew Duane said the following: What I was hoping to do was design a better mechanism for passing that R/O detection from the device to the filesystem code. Our implementation uses a platform sysctl that checks the incoming device name against some hardware or software

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Warner Losh
On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: Hi, hackers. I have a question: why ipv4 netmask is displayed by ifconfig in hex format? Isn't dot-decimal notation more human-readable? Will the attached patch break something in the very bad way? This is a gratuitous change that would

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Sergey Vinogradov
On 08.04.2011 19:23, Mike Oliver wrote: On Fri, Apr 8, 2011 at 08:08, Sergey Vinogradovboo...@lazybytes.org wrote: Hi, hackers. I have a question: why ipv4 netmask is displayed by ifconfig in hex format? Isn't dot-decimal notation more human-readable? Will the attached patch break something in

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Sergey Vinogradov
On 08.04.2011 19:23, Warner Losh wrote: On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: Hi, hackers. I have a question: why ipv4 netmask is displayed by ifconfig in hex format? Isn't dot-decimal notation more human-readable? Will the attached patch break something in the very bad way?

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Damien Fleuriot
On 4/8/11 5:40 PM, Sergey Vinogradov wrote: On 08.04.2011 19:23, Warner Losh wrote: On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: Hi, hackers. I have a question: why ipv4 netmask is displayed by ifconfig in hex format? Isn't dot-decimal notation more human-readable? Will the

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Mike Oliver
On Fri, Apr 8, 2011 at 08:08, Sergey Vinogradov boo...@lazybytes.org wrote: Hi, hackers. I have a question: why ipv4 netmask is displayed by ifconfig in hex format? Isn't dot-decimal notation more human-readable? Will the attached patch break something in the very bad way? Who's using IPv4

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Garrett Cooper
On Fri, Apr 8, 2011 at 8:40 AM, Sergey Vinogradov boo...@lazybytes.org wrote: On 08.04.2011 19:23, Warner Losh wrote: On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: Hi, hackers. I have a question: why ipv4 netmask is displayed by ifconfig in hex format? Isn't dot-decimal notation more

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Mike Bristow
On Fri, Apr 08, 2011 at 07:40:56PM +0400, Sergey Vinogradov wrote: On 08.04.2011 19:23, Warner Losh wrote: On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: If we really wanted to make it human readable, we'd output 10.2.3.4/24 So, maybe, while following the POLA, we should add an

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Mike Oliver
On Fri, Apr 8, 2011 at 11:53, Garrett Cooper yaneg...@gmail.com wrote: One thing I've been curious about for a while that I haven't had an opportunity to look into is: what does IPV6 look like? I understand that the /netmask bit is added to the end of addresses, but what does the netmask

RE: retry mounting with ro when rw fails

2011-04-08 Thread Andrew Duane
For SCSI-attached disks, yes. But other hardware has write-protect sensing (SD cards, CD-roms, our platform). So if you can do that, you should Cleaning up after a failed write is a real problem, one that I needed to avoid. /Andrew -Original Message- From: Andriy Gapon

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Warner Losh
On Apr 8, 2011, at 9:55 AM, Mike Bristow wrote: On Fri, Apr 08, 2011 at 07:40:56PM +0400, Sergey Vinogradov wrote: On 08.04.2011 19:23, Warner Losh wrote: On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: If we really wanted to make it human readable, we'd output 10.2.3.4/24 So, maybe,

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Sergey Vinogradov
[snip] So, maybe, while following the POLA, we should add an option, as Daniel mentioned above? To output the CIDR? Eh... I don't know if doing this would be wise because it might break some 3rd party mechanisms for parsing the output (as broken as you might think it is), in particular (for

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Sergey Vinogradov
08.04.2011 19:55, Mike Bristow пишет: On Fri, Apr 08, 2011 at 07:40:56PM +0400, Sergey Vinogradov wrote: On 08.04.2011 19:23, Warner Losh wrote: On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: If we really wanted to make it human readable, we'd output 10.2.3.4/24 So, maybe, while

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Warner Losh
On Apr 8, 2011, at 1:00 PM, Sergey Vinogradov wrote: 08.04.2011 19:55, Mike Bristow пишет: On Fri, Apr 08, 2011 at 07:40:56PM +0400, Sergey Vinogradov wrote: On 08.04.2011 19:23, Warner Losh wrote: On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: If we really wanted to make it human

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Paul Schenkeveld
On Fri, Apr 08, 2011 at 01:16:17PM -0600, Warner Losh wrote: On Apr 8, 2011, at 1:00 PM, Sergey Vinogradov wrote: 08.04.2011 19:55, Mike Bristow пишет: On Fri, Apr 08, 2011 at 07:40:56PM +0400, Sergey Vinogradov wrote: On 08.04.2011 19:23, Warner Losh wrote: On Apr 8, 2011, at

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Matthew Seaman
On 08/04/2011 16:53, Garrett Cooper wrote: One thing I've been curious about for a while that I haven't had an opportunity to look into is: what does IPV6 look like? I understand that the /netmask bit is added to the end of addresses, but what does the netmask actually look like? Like this:

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Bjoern A. Zeeb
On Fri, 8 Apr 2011, Warner Losh wrote: Non-contiguous netmasks are *not* legal anymore in IPv4. Just reference the RFC and everyone will agree... *oops* ;-) On the general thread: I'd seriously stop bothering with any decisions that will change the way IPv4 works or has worked or the output

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread J. Hellenthal
On Fri, Apr 08, 2011 at 07:36:45PM +0400, Sergey Vinogradov wrote: On 08.04.2011 19:23, Mike Oliver wrote: On Fri, Apr 8, 2011 at 08:08, Sergey Vinogradovboo...@lazybytes.org wrote: Hi, hackers. I have a question: why ipv4 netmask is displayed by ifconfig in hex format? Isn't dot-decimal notation

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Garrett Cooper
On Fri, Apr 8, 2011 at 9:54 PM, J. Hellenthal jh...@dataix.net wrote: On Fri, Apr 08, 2011 at 07:36:45PM +0400, Sergey Vinogradov wrote: On 08.04.2011 19:23, Mike Oliver wrote: On Fri, Apr 8, 2011 at 08:08, Sergey Vinogradovboo...@lazybytes.org  wrote: Hi, hackers. I have a question: why ipv4