public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Riesen <alexander.riesen@synopsys.COM>
To: Patrick Mochel <mochel@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.5.86+: sizes of almost all files in sysfs are 4k?
Date: Tue, 13 May 2003 19:05:36 +0200	[thread overview]
Message-ID: <20030513170536.GA4580@Synopsys.COM> (raw)
In-Reply-To: <Pine.LNX.4.44.0305130954390.9816-100000@cherise>

Patrick Mochel, Tue, May 13, 2003 18:58:34 +0200:
> > If the size is not simple/possible to calculate, maybe using 0
> > would be an option for the cases where the size doesn't carry
> > any information (like in procfs)?
> 
> It was 0 before, which works fine for cat(1). By hardcoding the size, some 
> bugs are exposed, since the size is reset for some reason when you try to 
> open the file for writing, even if open(2) returns an error. 
> 
> Ideally, we should be calculating the size, and using that. However, that 
> would involve keeping type information about the file around, which we 
> don't currently do. Research/patches in this area would be greatly 
> appreciated. 

we could also pretend the files are sparse, and return zero-filled data.
Though, i fear, this will also confuse something.

-alex

      reply	other threads:[~2003-05-13 16:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-23  8:27 2.5.86+: sizes of almost all files in sysfs are 4k? Alex Riesen
2003-05-13 16:58 ` Patrick Mochel
2003-05-13 17:05   ` Alex Riesen [this message]

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=20030513170536.GA4580@Synopsys.COM \
    --to=alexander.riesen@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@osdl.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