From: Daniel Phillips <phillips@innominate.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>, Dave <djdave@bigpond.net.au>,
linux-kernel@vger.kernel.org
Subject: Re: ftruncate returning EPERM on vfat filesystem
Date: Sun, 07 Jan 2001 17:44:54 +0100 [thread overview]
Message-ID: <3A589D06.D65FDDA9@innominate.de> (raw)
In-Reply-To: <Pine.LNX.4.30.0101071613130.1132-100000@athlon.internal> <E14FGI2-0002fo-00@the-village.bc.nu>
Alan Cox wrote:
>
> > +
> > + /* FAT cannot truncate to a longer file */
> > + if (attr->ia_valid & ATTR_SIZE) {
> > + if (attr->ia_size > inode->i_size)
> > + return -EPERM;
> > + }
> >
> > error = inode_change_ok(inode, attr);
> > if (error)
> >
> > Can someone tell me if this is the cause of my samba problems, and if
> > so, why this was added and if this is safe to revert?
>
> To stop a case where the fs gets corrupted otherwise. You can change that to
> return 0 which is more correct but most not remove it.
>
> (ftruncate is specified to make the file at most length bytes long, extending
> the file is not a guaranteed side effect according to the docs I have)
Speaking as an old time dos hacker, this is allowed and commonly done.
I wouldn't read too much into the fact that it's not documented. :-)
As I recall, new clusters are allocated but not cleared.
--
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-07 16:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-07 6:47 ftruncate returning EPERM on vfat filesystem Dave
2001-01-07 13:55 ` Alan Cox
2001-01-07 15:20 ` Dave
2001-01-07 16:44 ` Daniel Phillips [this message]
2001-01-07 21:03 ` Richard Henderson
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=3A589D06.D65FDDA9@innominate.de \
--to=phillips@innominate.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=djdave@bigpond.net.au \
--cc=linux-kernel@vger.kernel.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