Mike
This patch is provided to address a situation where the application
is 32 bit and kernel is 64 bit.
We need to call compat_sys only under such situation.
More over support for this is already there in current version of
glibc (CVS repository) so we have to wait till distros pick up the glibc.
Than we can make fallocate calls (glibc internal posix_fallocate()) to
glibc instead of calling syscall(). Regarding support to more architecture
I didnt add many as I saw this as temporary solution till we start using
glibc implementation.
uname() calls were made to check which version of kernel we have(64
bit ?), if you are aware of any other method please let us know. I tried
your suggestion it doesnt work fallocate comes out with "File too large"
error.
Thanks
Sharyathi N
Mike Frysinger
<[EMAIL PROTECTED]
g> To
Subrata Modak1/India/[EMAIL PROTECTED]
02/27/2008 03:30 cc
AM [email protected],
Mohammed Omar/India/[EMAIL PROTECTED],
Nagesh Sharyathi/India/[EMAIL
PROTECTED],
Amit K Arora/India/[EMAIL PROTECTED],
Sripathi Kodi/India/[EMAIL PROTECTED],
Suresh Kodati/India/[EMAIL PROTECTED],
Supriya Kannery/India/[EMAIL PROTECTED],
Ricardo Salveti de Araujo
<[EMAIL PROTECTED]>
Subject
Re: RFC: Failing fallocate tests
::::::
On Monday 18 February 2008, Subrata Modak1 wrote:
> Please see an attached patch from Sharyathi for failing fallocate test
> cases.
i dont seem to have the e-mails before this one ...
> Omar,
> Attaching the work around patch. This will address the problem until
> distros update with latest glibc which has fallocate implementation.
> This is not extensively tested and built with some assumption
> like
> o we are testing on x86* and ppc* archs
> o on 64 bit machine we will always see 64 bit kernel running
> I dont think this needs to be pushed to LTP (any suggestions ??)
> But will definitely help you in your fallocate testing process.
it isnt specific to x86 or ppc. you'll see it on any arch that has
multiple
bit personalities (like s390 on s390x or x86 on ia64 or mips/o32 on mips64
or ...). in other words, looking at uname() isnt the way to go.
if you want to call the fallocate() sycall directly, why not base it on the
size of your types:
if (sizeof(size_t) == sizeof(uint32_t))
return syscall(__NR_fallocate, fd, mode,
(long int)(offset >> 32), (long int)offset,
(long int)(len >> 32), (long int)len);
else
return syscall(__NR_fallocate, fd, mode, offset, len);
-mike
(See attached file: signature.asc)
signature.asc
Description: Binary data
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
