From: Sascha Hauer <s.hauer@pengutronix.de>
To: Giorgio Dal Molin <giorgio.nicole@arcor.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: problems writing an fs image to a disk partition
Date: Wed, 12 Sep 2018 09:12:57 +0200 [thread overview]
Message-ID: <20180912071257.GC7949@pengutronix.de> (raw)
In-Reply-To: <25ad4979-9e11-45a4-7e17-efa903435574@arcor.de>
Hi Giorgio,
On Tue, Sep 11, 2018 at 10:33:52PM +0200, Giorgio Dal Molin wrote:
> Hi,
>
> today I've tried barebox v2018.09.0 on an EFI system.
> It basically runs but I have problems when writing an fs image file
> to a disk partition:
>
> > cp rootfs.img /dev/disk1.userland
>
> barebox v2018.09.0 returns a 'no space left on device' error.
>
> First of all I must ask if this is still the proper way to
> write a content to a disk partition.
Yes, it is. You found a bug.
>
> In case this should still work as expected here is a pseudo
> backtrace of how the error happens on my system:
>
> commands/cp.c:do_cp() ret = copy_file(argv[i], argv[argc - 1], verbose);
> lib/libfile.c:copy_file() dstfd = open(dst, mode);
> fs/fs.c:open() error = fsdrv->truncate(&fsdev->dev, f, 0);
> fs/devfs.c: devfs_truncate()
>
> in the call to devfs_truncate() I see cdev->ops->truncate == NULL
> and f->fsdev->dev.num_resources == 0 and this makes the function
> return -ENOSPC.
>
> Hope the report helps identify a problem.
Yes, indeed, thanks. The problem was that with the switch to dentry
cache implementation the files in /dev/ no longer appear as character
devices but as regular files. the copy_file function then does a
truncate on the files which fails. I just sent out a patch addressing
this issue, please test. I would also recommend to take the second patch
although this fixes another issue.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-09-12 7:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-11 20:33 Giorgio Dal Molin
2018-09-12 7:12 ` Sascha Hauer [this message]
2018-09-12 7:31 ` Giorgio Dal Molin
2018-09-12 15:06 ` Giorgio Dal Molin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180912071257.GC7949@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=giorgio.nicole@arcor.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox