Re: svn commit: r365643 - head/bin/cp

2020-09-27 Thread Scott Long
>> normal means before devfs can be mounted. However, several people have >> looked and found no evidence on their system. This means there's something >> special / unique to Rod's setup that's generating them (assuming it isn't a >> simple chroot without devfs). What that is, and how they come

Re: svn commit: r365643 - head/bin/cp

2020-09-26 Thread Rodney W. Grimes
> On Sat, Sep 26, 2020 at 12:58 PM Benjamin Kaduk wrote: > > > On Sat, Sep 26, 2020 at 11:55 AM Warner Losh wrote: > > > >> And there's the rub: how did this file come to exist? I'm certain it isn't > >> booting or shutting down the system based on when devfs is mounted (before > >> init) and

Re: svn commit: r365643 - head/bin/cp

2020-09-26 Thread Warner Losh
On Sat, Sep 26, 2020, 1:50 PM Benjamin Kaduk wrote: > On Sat, Sep 26, 2020 at 12:35 PM Warner Losh wrote: > >> >> >> On Sat, Sep 26, 2020 at 12:58 PM Benjamin Kaduk >> wrote: >> >>> On Sat, Sep 26, 2020 at 11:55 AM Warner Losh wrote: >>> And there's the rub: how did this file come to

Re: svn commit: r365643 - head/bin/cp

2020-09-26 Thread Benjamin Kaduk
On Sat, Sep 26, 2020 at 12:35 PM Warner Losh wrote: > > > On Sat, Sep 26, 2020 at 12:58 PM Benjamin Kaduk wrote: > >> On Sat, Sep 26, 2020 at 11:55 AM Warner Losh wrote: >> >>> And there's the rub: how did this file come to exist? I'm certain it >>> isn't >>> booting or shutting down the

Re: svn commit: r365643 - head/bin/cp

2020-09-26 Thread Warner Losh
On Sat, Sep 26, 2020 at 12:58 PM Benjamin Kaduk wrote: > On Sat, Sep 26, 2020 at 11:55 AM Warner Losh wrote: > >> And there's the rub: how did this file come to exist? I'm certain it isn't >> booting or shutting down the system based on when devfs is mounted (before >> init) and unmounted (it's

Re: svn commit: r365643 - head/bin/cp

2020-09-26 Thread Konstantin Belousov
On Sat, Sep 26, 2020 at 10:02:10AM -0700, Rodney W. Grimes wrote: > > > On Fri, 2020-09-25 at 10:55 -0700, Rodney W. Grimes wrote: > > > > I was under the impression from previous reading and kib's response > > > > that this is a complete non-issue, there's no way you can go > > > > multi-user

Re: svn commit: r365643 - head/bin/cp

2020-09-26 Thread Benjamin Kaduk
On Sat, Sep 26, 2020 at 11:55 AM Warner Losh wrote: > And there's the rub: how did this file come to exist? I'm certain it isn't > booting or shutting down the system based on when devfs is mounted (before > init) and unmounted (it's not done by the shutdown scripts). Now, it's > always possible

Re: svn commit: r365643 - head/bin/cp

2020-09-26 Thread Warner Losh
On Sat, Sep 26, 2020 at 11:02 AM Rodney W. Grimes wrote: > > > On Fri, 2020-09-25 at 10:55 -0700, Rodney W. Grimes wrote: > > > > I was under the impression from previous reading and kib's response > > > > that this is a complete non-issue, there's no way you can go > > > > multi-user without a

Re: svn commit: r365643 - head/bin/cp

2020-09-26 Thread Rodney W. Grimes
> On Fri, 2020-09-25 at 10:55 -0700, Rodney W. Grimes wrote: > > > I was under the impression from previous reading and kib's response > > > that this is a complete non-issue, there's no way you can go > > > multi-user without a mounted /dev and we go to somewhat great > > > lengths to make sure

Re: svn commit: r365643 - head/bin/cp

2020-09-25 Thread Mateusz Guzik
Perhaps this is a leftover from the installer (or some version of it anyway), i.e. this might have been happening in the past but likely does not now. fwiw I just exported / over nfs in a vm, /dev is empty On 9/25/20, Ian Lepore wrote: > On Fri, 2020-09-25 at 20:48 +0100, Edward Tomasz

Re: svn commit: r365643 - head/bin/cp

2020-09-25 Thread Ian Lepore
On Fri, 2020-09-25 at 20:48 +0100, Edward Tomasz Napierała wrote: > > On 25 Sep 2020, at 19:12, Ian Lepore wrote: > > [..] > > > (A question that occurs to me: could it be that the files you've > > seen > > got created at shutdown after devfs was unmounted, rather than at > > startup? I don't

Re: svn commit: r365643 - head/bin/cp

2020-09-25 Thread Edward Tomasz Napierała
> On 25 Sep 2020, at 19:12, Ian Lepore wrote: [..] > (A question that occurs to me: could it be that the files you've seen > got created at shutdown after devfs was unmounted, rather than at > startup? I don't know enough about the shutdown sequence to know > whether that's possible.) Thing

Re: svn commit: r365643 - head/bin/cp

2020-09-25 Thread Ian Lepore
On Fri, 2020-09-25 at 10:55 -0700, Rodney W. Grimes wrote: > > I was under the impression from previous reading and kib's response > > that this is a complete non-issue, there's no way you can go > > multi-user without a mounted /dev and we go to somewhat great > > lengths to make sure we're good.

Re: svn commit: r365643 - head/bin/cp

2020-09-25 Thread Rodney W. Grimes
> On Thu, Sep 24, 2020 at 3:08 AM Stefan Esser wrote: > > > > Am 24.09.20 um 08:54 schrieb Warner Losh: > > > > > > > > > On Thu, Sep 24, 2020 at 12:41 AM Stefan Esser > > > wrote: > > > > > > Am 23.09.20 um 19:23 schrieb Warner Losh> But for this issue, we're > > >

Re: svn commit: r365643 - head/bin/cp

2020-09-25 Thread Rodney W. Grimes
> Am 24.09.20 um 08:54 schrieb Warner Losh: > > > > > > On Thu, Sep 24, 2020 at 12:41 AM Stefan Esser > > wrote: > > > > Am 23.09.20 um 19:23 schrieb Warner Losh> But for this issue, we're not > > mounting devfs early enough.? We should > > > fix that.

Re: svn commit: r365643 - head/bin/cp

2020-09-25 Thread Rodney W. Grimes
> On Thu, Sep 24, 2020 at 12:41 AM Stefan Esser wrote: > > > Am 23.09.20 um 19:23 schrieb Warner Losh> But for this issue, we're not > > mounting devfs early enough. We should > > > fix that. Removing /dev/null from the boot process likely is never going > > > to happen because we use it all

Re: svn commit: r365643 - head/bin/cp

2020-09-25 Thread Rodney W. Grimes
> On Wed, Sep 23, 2020 at 11:23:51AM -0600, Warner Losh wrote: > > On Wed, Sep 23, 2020, 10:56 AM Rodney W. Grimes > > wrote: > > > > > > cp is already fixed, people are still feeling the fallout of being > > > > within those revisions and needing to bootstrap their own cp. We can > > > > reduce

Re: svn commit: r365643 - head/bin/cp

2020-09-24 Thread Kyle Evans
On Thu, Sep 24, 2020 at 3:08 AM Stefan Esser wrote: > > Am 24.09.20 um 08:54 schrieb Warner Losh: > > > > > > On Thu, Sep 24, 2020 at 12:41 AM Stefan Esser > > wrote: > > > > Am 23.09.20 um 19:23 schrieb Warner Losh> But for this issue, we're not > > mounting

Re: svn commit: r365643 - head/bin/cp

2020-09-24 Thread Stefan Esser
Am 24.09.20 um 08:54 schrieb Warner Losh: On Thu, Sep 24, 2020 at 12:41 AM Stefan Esser > wrote: Am 23.09.20 um 19:23 schrieb Warner Losh> But for this issue, we're not mounting devfs early enough.  We should > fix that. Removing /dev/null from the boot

Re: svn commit: r365643 - head/bin/cp

2020-09-24 Thread Warner Losh
On Thu, Sep 24, 2020 at 12:41 AM Stefan Esser wrote: > Am 23.09.20 um 19:23 schrieb Warner Losh> But for this issue, we're not > mounting devfs early enough. We should > > fix that. Removing /dev/null from the boot process likely is never going > > to happen because we use it all over the place

Re: svn commit: r365643 - head/bin/cp

2020-09-24 Thread Stefan Esser
Am 23.09.20 um 19:23 schrieb Warner Losh> But for this issue, we're not mounting devfs early enough.  We should fix that. Removing /dev/null from the boot process likely is never going to happen because we use it all over the place to discard output... There's ~200 instances of it in the boot

Re: svn commit: r365643 - head/bin/cp

2020-09-23 Thread Konstantin Belousov
On Wed, Sep 23, 2020 at 11:23:51AM -0600, Warner Losh wrote: > On Wed, Sep 23, 2020, 10:56 AM Rodney W. Grimes > wrote: > > > > cp is already fixed, people are still feeling the fallout of being > > > within those revisions and needing to bootstrap their own cp. We can > > > reduce the number of

Re: svn commit: r365643 - head/bin/cp

2020-09-23 Thread Mateusz Piotrowski
On 9/23/20 7:23 PM, Warner Losh wrote: On Wed, Sep 23, 2020, 10:56 AM Rodney W. Grimes wrote: cp is already fixed, people are still feeling the fallout of being within those revisions and needing to bootstrap their own cp. We can reduce the number of components these invocations rely on

Re: svn commit: r365643 - head/bin/cp

2020-09-23 Thread Warner Losh
On Wed, Sep 23, 2020, 10:56 AM Rodney W. Grimes wrote: > > cp is already fixed, people are still feeling the fallout of being > > within those revisions and needing to bootstrap their own cp. We can > > reduce the number of components these invocations rely on trivially to > > shell built-in

Re: svn commit: r365643 - head/bin/cp

2020-09-23 Thread Rodney W. Grimes
> cp is already fixed, people are still feeling the fallout of being > within those revisions and needing to bootstrap their own cp. We can > reduce the number of components these invocations rely on trivially to > shell built-in mechanics, why not do so? I would even go further, I would like to

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Warner Losh
I already committed... There's no need for a special upgrade process... Warner On Tue, Sep 22, 2020 at 8:59 PM Alan Somers wrote: > Go ahead and commit. Consider it reviewed by me. And if I understand > correctly, this commit means there's no need for a special updating > procedure, right? >

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Kyle Evans
Correct- we're good now. Thanks! On Tue, Sep 22, 2020 at 9:59 PM Alan Somers wrote: > > Go ahead and commit. Consider it reviewed by me. And if I understand > correctly, this commit means there's no need for a special updating > procedure, right? > > On Tue, Sep 22, 2020 at 6:55 PM Warner

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Alan Somers
Go ahead and commit. Consider it reviewed by me. And if I understand correctly, this commit means there's no need for a special updating procedure, right? On Tue, Sep 22, 2020 at 6:55 PM Warner Losh wrote: > > > On Tue, Sep 22, 2020 at 5:17 PM Kyle Evans wrote: > >> On Tue, Sep 22, 2020,

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Warner Losh
On Tue, Sep 22, 2020 at 5:17 PM Kyle Evans wrote: > On Tue, Sep 22, 2020, 17:02 Warner Losh wrote: > >> >> >> On Tue, Sep 22, 2020 at 3:55 PM Kyle Evans wrote: >> >>> On Tue, Sep 22, 2020 at 4:53 PM Ian Lepore wrote: >>> > >>> > On Tue, 2020-09-22 at 15:50 -0600, Warner Losh wrote: >>> > > I

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Kyle Evans
On Tue, Sep 22, 2020, 17:02 Warner Losh wrote: > > > On Tue, Sep 22, 2020 at 3:55 PM Kyle Evans wrote: > >> On Tue, Sep 22, 2020 at 4:53 PM Ian Lepore wrote: >> > >> > On Tue, 2020-09-22 at 15:50 -0600, Warner Losh wrote: >> > > I think it's a great leap sideways, but I've done cp /dev/null

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Warner Losh
On Tue, Sep 22, 2020 at 3:55 PM Kyle Evans wrote: > On Tue, Sep 22, 2020 at 4:53 PM Ian Lepore wrote: > > > > On Tue, 2020-09-22 at 15:50 -0600, Warner Losh wrote: > > > I think it's a great leap sideways, but I've done cp /dev/null foo to > > > clear > > > it out for 35 years now... It's why

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Kyle Evans
On Tue, Sep 22, 2020 at 4:53 PM Ian Lepore wrote: > > On Tue, 2020-09-22 at 15:50 -0600, Warner Losh wrote: > > I think it's a great leap sideways, but I've done cp /dev/null foo to > > clear > > it out for 35 years now... It's why it feels like a workaround. > > > > Though it is a legit

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Toomas Soome via svn-src-all
> On 23. Sep 2020, at 00:50, Warner Losh wrote: > > I think it's a great leap sideways, but I've done cp /dev/null foo to clear > it out for 35 years now... It's why it feels like a workaround. > > Though it is a legit optimization, no matter the feelings. As for clearer, > I'm less sure

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Ian Lepore
On Tue, 2020-09-22 at 15:50 -0600, Warner Losh wrote: > I think it's a great leap sideways, but I've done cp /dev/null foo to > clear > it out for 35 years now... It's why it feels like a workaround. > > Though it is a legit optimization, no matter the feelings. As for > clearer, > I'm less sure

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Warner Losh
I think it's a great leap sideways, but I've done cp /dev/null foo to clear it out for 35 years now... It's why it feels like a workaround. Though it is a legit optimization, no matter the feelings. As for clearer, I'm less sure since then I have to remember what the : operator does. Warner On

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Alan Somers
It doesn't feel like a workaround to me. I think Kyle's version is clearer than the original. On Tue, Sep 22, 2020 at 3:45 PM Warner Losh wrote: > > > On Tue, Sep 22, 2020 at 3:42 PM Kyle Evans wrote: > >> cp is already fixed, people are still feeling the fallout of being >> within those

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Warner Losh
On Tue, Sep 22, 2020 at 3:42 PM Kyle Evans wrote: > cp is already fixed, people are still feeling the fallout of being > within those revisions and needing to bootstrap their own cp. We can > reduce the number of components these invocations rely on trivially to > shell built-in mechanics, why

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Kyle Evans
cp is already fixed, people are still feeling the fallout of being within those revisions and needing to bootstrap their own cp. We can reduce the number of components these invocations rely on trivially to shell built-in mechanics, why not do so? On Tue, Sep 22, 2020 at 4:40 PM Warner Losh

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Warner Losh
So why do we need a workaround at all? cp /dev/null has been fixed, and that's way more important to get right. I don't want to paper-over issues with this at all, though if we use the host's (now broken) cp, I suppose that might be OK in the short term. If that's the case, then maybe this is OK.

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Alan Somers
+1. On Tue, Sep 22, 2020 at 3:27 PM Kyle Evans wrote: > I'm running a build at the suggestion of mjg to confirm there aren't > any others hiding that can be converted, and I will commit after I've > verified that this is it. > > On Tue, Sep 22, 2020 at 4:02 PM Alan Somers wrote: > > > > LGTM.

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Kyle Evans
I'm running a build at the suggestion of mjg to confirm there aren't any others hiding that can be converted, and I will commit after I've verified that this is it. On Tue, Sep 22, 2020 at 4:02 PM Alan Somers wrote: > > LGTM. > > On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans wrote: >> >> Perhaps:

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Alan Somers
LGTM. On Tue, Sep 22, 2020 at 2:59 PM Kyle Evans wrote: > Perhaps: > > diff --git a/stand/i386/zfsboot/Makefile b/stand/i386/zfsboot/Makefile > index ff315abc0ef..7e362b43a39 100644 > --- a/stand/i386/zfsboot/Makefile > +++ b/stand/i386/zfsboot/Makefile > @@ -81,7 +81,7 @@ zfsboot.ld:

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Kyle Evans
Perhaps: diff --git a/stand/i386/zfsboot/Makefile b/stand/i386/zfsboot/Makefile index ff315abc0ef..7e362b43a39 100644 --- a/stand/i386/zfsboot/Makefile +++ b/stand/i386/zfsboot/Makefile @@ -81,7 +81,7 @@ zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} -o ${.TARGET} -P 1 zfsboot.bin

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Alan Somers
Looks like two places in stand. Is there any reason why Mateusz's suggestion wouldn't work? > rg -g Makefile 'cp.*/dev/null' stand/libsa/Makefile 125: [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ stand/i386/zfsboot/Makefile 82: cp /dev/null ${.TARGET} On Tue, Sep 22, 2020 at 2:54 PM

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Kyle Evans
On Tue, Sep 22, 2020 at 3:54 PM Mateusz Guzik wrote: > On 9/22/20, Alan Somers wrote: > > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans wrote: > > > >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers wrote: > >> > > >> > Author: asomers > >> > Date: Fri Sep 11 20:49:36 2020 > >> > New Revision:

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Mateusz Guzik
Can we instead add a workaround to the build tree? Where is cp /dev/null coming from anyway? Perhaps this can be patched to touch the target file. On 9/22/20, Alan Somers wrote: > On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans wrote: > >> On Fri, Sep 11, 2020 at 3:49 PM Alan Somers wrote: >> > >>

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Alan Somers
On Tue, Sep 22, 2020 at 2:48 PM Kyle Evans wrote: > On Fri, Sep 11, 2020 at 3:49 PM Alan Somers wrote: > > > > Author: asomers > > Date: Fri Sep 11 20:49:36 2020 > > New Revision: 365643 > > URL: https://svnweb.freebsd.org/changeset/base/365643 > > > > Log: > > cp: fall back to read/write if

Re: svn commit: r365643 - head/bin/cp

2020-09-22 Thread Kyle Evans
On Fri, Sep 11, 2020 at 3:49 PM Alan Somers wrote: > > Author: asomers > Date: Fri Sep 11 20:49:36 2020 > New Revision: 365643 > URL: https://svnweb.freebsd.org/changeset/base/365643 > > Log: > cp: fall back to read/write if copy_file_range fails > > Even though copy_file_range has a

Re: svn commit: r365643 - head/bin/cp

2020-09-20 Thread Rick Macklem
Alan Somers wrote: >On Sat, Sep 19, 2020 at 5:32 PM Konstantin Belousov >mailto:kostik...@gmail.com>> wrote: >On Sat, Sep 19, 2020 at 11:18:56PM +, Rick Macklem wrote: >> Alan Somers wrote: >> >On Fri, Sep 11, 2020 at 3:52 PM Rick Macklem >>

Re: svn commit: r365643 - head/bin/cp

2020-09-19 Thread Alan Somers
On Sat, Sep 19, 2020 at 5:32 PM Konstantin Belousov wrote: > On Sat, Sep 19, 2020 at 11:18:56PM +, Rick Macklem wrote: > > Alan Somers wrote: > > >On Fri, Sep 11, 2020 at 3:52 PM Rick Macklem > wrote: > > >Konstantin Belousov wrote: > > >>On Fri, Sep 11, 2020 at

Re: svn commit: r365643 - head/bin/cp

2020-09-19 Thread Rick Macklem
Kyle Evans wrote: [stuff snipped] >Testing on Debian I seem to get back an EINVAL, but I think it's maybe >a little surprising: > > EXDEV The files referred to by file_in and file_out are > not on the same mounted filesystem. Well, as Alan noted, Linux is not a standard and

Re: svn commit: r365643 - head/bin/cp

2020-09-19 Thread Konstantin Belousov
On Sat, Sep 19, 2020 at 11:18:56PM +, Rick Macklem wrote: > Alan Somers wrote: > >On Fri, Sep 11, 2020 at 3:52 PM Rick Macklem > >mailto:rmack...@uoguelph.ca>> wrote: > >Konstantin Belousov wrote: > >>On Fri, Sep 11, 2020 at 08:49:36PM +, Alan Somers wrote: > >>> Author: asomers > >>>

Re: svn commit: r365643 - head/bin/cp

2020-09-19 Thread Kyle Evans
On Sat, Sep 19, 2020 at 6:19 PM Rick Macklem wrote: > > Alan Somers wrote: > >On Fri, Sep 11, 2020 at 3:52 PM Rick Macklem > >mailto:rmack...@uoguelph.ca>> wrote: > >Konstantin Belousov wrote: > >>On Fri, Sep 11, 2020 at 08:49:36PM +, Alan Somers wrote: > >>> Author: asomers > >>> Date: Fri

Re: svn commit: r365643 - head/bin/cp

2020-09-19 Thread Rick Macklem
Alan Somers wrote: >On Fri, Sep 11, 2020 at 3:52 PM Rick Macklem >mailto:rmack...@uoguelph.ca>> wrote: >Konstantin Belousov wrote: >>On Fri, Sep 11, 2020 at 08:49:36PM +, Alan Somers wrote: >>> Author: asomers >>> Date: Fri Sep 11 20:49:36 2020 >>> New Revision: 365643 >>> URL:

Re: svn commit: r365643 - head/bin/cp

2020-09-19 Thread Alan Somers
On Fri, Sep 11, 2020 at 3:52 PM Rick Macklem wrote: > Konstantin Belousov wrote: > >On Fri, Sep 11, 2020 at 08:49:36PM +, Alan Somers wrote: > >> Author: asomers > >> Date: Fri Sep 11 20:49:36 2020 > >> New Revision: 365643 > >> URL: https://svnweb.freebsd.org/changeset/base/365643 > >> > >>

Re: svn commit: r365643 - head/bin/cp

2020-09-11 Thread Rick Macklem
Konstantin Belousov wrote: >On Fri, Sep 11, 2020 at 08:49:36PM +, Alan Somers wrote: >> Author: asomers >> Date: Fri Sep 11 20:49:36 2020 >> New Revision: 365643 >> URL: https://svnweb.freebsd.org/changeset/base/365643 >> >> Log: >> cp: fall back to read/write if copy_file_range fails >> >>

Re: svn commit: r365643 - head/bin/cp

2020-09-11 Thread Konstantin Belousov
On Fri, Sep 11, 2020 at 08:49:36PM +, Alan Somers wrote: > Author: asomers > Date: Fri Sep 11 20:49:36 2020 > New Revision: 365643 > URL: https://svnweb.freebsd.org/changeset/base/365643 > > Log: > cp: fall back to read/write if copy_file_range fails > > Even though copy_file_range has

svn commit: r365643 - head/bin/cp

2020-09-11 Thread Alan Somers
Author: asomers Date: Fri Sep 11 20:49:36 2020 New Revision: 365643 URL: https://svnweb.freebsd.org/changeset/base/365643 Log: cp: fall back to read/write if copy_file_range fails Even though copy_file_range has a file-system agnostic version, it still fails on devfs (perhaps because the