]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/xfs/xfs_iomap.c
xfs: introduce xfs_bmapi_delay()
[mv-sheeva.git] / fs / xfs / xfs_iomap.c
index 091d82b94c4de518208d8eebc37abe4a7f3d4f1d..681ba34c9233c55709bd0c9b03b7484ecf6524cc 100644 (file)
@@ -300,8 +300,8 @@ xfs_iomap_eof_want_preallocate(
        while (count_fsb > 0) {
                imaps = nimaps;
                firstblock = NULLFSBLOCK;
-               error = xfs_bmapi(NULL, ip, start_fsb, count_fsb, 0,
-                                 &firstblock, 0, imap, &imaps, NULL);
+               error = xfs_bmapi_read(ip, start_fsb, count_fsb, imap, &imaps,
+                                      0);
                if (error)
                        return error;
                for (n = 0; n < imaps; n++) {
@@ -381,7 +381,6 @@ xfs_iomap_write_delay(
        xfs_fileoff_t   last_fsb;
        xfs_off_t       aligned_offset;
        xfs_fileoff_t   ioalign;
-       xfs_fsblock_t   firstblock;
        xfs_extlen_t    extsz;
        int             nimaps;
        xfs_bmbt_irec_t imap[XFS_WRITE_IMAPS];
@@ -425,12 +424,8 @@ retry:
        }
 
        nimaps = XFS_WRITE_IMAPS;
-       firstblock = NULLFSBLOCK;
-       error = xfs_bmapi(NULL, ip, offset_fsb,
-                         (xfs_filblks_t)(last_fsb - offset_fsb),
-                         XFS_BMAPI_DELAY | XFS_BMAPI_WRITE |
-                         XFS_BMAPI_ENTIRE, &firstblock, 1, imap,
-                         &nimaps, NULL);
+       error = xfs_bmapi_delay(ip, offset_fsb, last_fsb - offset_fsb,
+                               imap, &nimaps, XFS_BMAPI_ENTIRE);
        switch (error) {
        case 0:
        case ENOSPC: