From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Artem Bityutskiy <dedekind@infradead.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [RFC] ubi: tmp hack for lstat
Date: Mon, 20 Oct 2008 11:11:00 +0200 [thread overview]
Message-ID: <20081020091100.GA1324@www.tglx.de> (raw)
In-Reply-To: <1224479637.4466.55.camel@sauron>
* Artem Bityutskiy | 2008-10-20 08:13:57 [+0300]:
>Hi,
Hi,
>I've tried to stat various files in my /dev/ and all of them have size
>0.
None of them is a file filestem so no one of them returns something.
>Why UBI should be different?
As I made the patch I though that this is the expectingt behavior.
sda/hda return 0 but those are larger then a few MiBs so you use a fs on
top. So either nobody care(s|d) or it works as expected.
>Indeed, stat should return size of the
>inode, that is normal semantics. You suggest making stat on UBI volume
>character devices return volume size. It might help your application,
>but it'll confuse other applications - for example 'du', which uses stat
>to calculate directory size. So am not sure it is good idea.
It would report the size you would get after a read(). A cp()1 on ubi
would copy the content of the node unless called with -a.
I'm actually not sure what the expected behavior is. stat() returns
information about a file and ubi isn't a regular file it is a character
node. So it would be probably better to leave everything as it and
change userspace instead.
>Best regards,
>Artem Bityutskiy (???????????????? ??????????)
Sebastian
next prev parent reply other threads:[~2008-10-20 9:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-19 13:21 [RFC] ubi: tmp hack for lstat Sebastian Andrzej Siewior
2008-10-20 5:13 ` Artem Bityutskiy
2008-10-20 9:11 ` Sebastian Andrzej Siewior [this message]
2008-10-20 9:21 ` Artem Bityutskiy
2008-10-20 12:57 ` Peter Korsgaard
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=20081020091100.GA1324@www.tglx.de \
--to=bigeasy@linutronix.de \
--cc=dedekind@infradead.org \
--cc=linux-mtd@lists.infradead.org \
/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