xfs-masters
[Top] [All Lists]

[xfs-masters] [Bug 785] New: xfs_io doesn't correctly reallocate struct

To: xfs-master@xxxxxxxxxxx
Subject: [xfs-masters] [Bug 785] New: xfs_io doesn't correctly reallocate struct getbmapx in bmap_f
From: bugzilla-daemon@xxxxxxxxxxx
Date: Wed, 9 Jul 2008 12:56:08 -0700
Reply-to: xfs-masters@xxxxxxxxxxx
Sender: xfs-masters-bounce@xxxxxxxxxxx
http://oss.sgi.com/bugzilla/show_bug.cgi?id=785

           Summary: xfs_io doesn't correctly reallocate struct getbmapx in
                    bmap_f
           Product: Linux XFS
           Version: Current
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: xfsprogs
        AssignedTo: xfs-master@xxxxxxxxxxx
        ReportedBy: moosh009@xxxxxxxxx


in xfs_io if the initial guess is not big engough (ie there are more extents in
a file than 32), the output structure for the xfsctl(XFS_IOC_GETBMAPX) call is
not correctly re-allocated.  Also the initial guess is 32 not 256 as comments
suggest.

The diff to correct follows:
xfsprogs/io/bmap.c

153c153
<   map_size = nflag ? nflag+1 : 32;    /* initial guess - 256 */
---
>   map_size = nflag ? nflag+1 : 32;    /* initial guess - 32 */
164c164
<  *    by nflag, or the initial guess number of extents (256).
---
>  *    by nflag, or the initial guess number of extents (32).
230,231c230,231
<       if (fsx.fsx_nextents >= map_size-1) {
<           map_size = 2*(fsx.fsx_nextents+1);
---
>       if (2*fsx.fsx_nextents > map_size) {
>           map_size = 2*(fsx.fsx_nextents);

-- 
Configure bugmail: http://oss.sgi.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


<Prev in Thread] Current Thread [Next in Thread>
  • [xfs-masters] [Bug 785] New: xfs_io doesn't correctly reallocate struct getbmapx in bmap_f, bugzilla-daemon <=