Changeset 9a1d8ab in mainline for uspace/srv/fs/fat/fat.h


Ignore:
Timestamp:
2010-07-28T15:27:13Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0b749a3, 482dde7, c0e1be7
Parents:
14f2100 (diff), dba4a23 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jakub/helenos/fs.

This merge adds two important optimizations for appending files and doing
sequential I/O on them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat.h

    r14f2100 r9a1d8ab  
    4848
    4949#define min(a, b)               ((a) < (b) ? (a) : (b))
     50
     51/*
     52 * Convenience macros for accessing some frequently used boot sector members.
     53 */
     54#define BPS(bs)         uint16_t_le2host((bs)->bps)
     55#define SPC(bs)         (bs)->spc
     56#define RSCNT(bs)       uint16_t_le2host((bs)->rscnt)
     57#define FATCNT(bs)      (bs)->fatcnt
     58#define SF(bs)          uint16_t_le2host((bs)->sec_per_fat)
     59#define RDE(bs)         uint16_t_le2host((bs)->root_ent_max)
     60#define TS(bs)          (uint16_t_le2host((bs)->totsec16) != 0 ? \
     61                        uint16_t_le2host((bs)->totsec16) : \
     62                        uint32_t_le2host(bs->totsec32))
    5063
    5164#define BS_BLOCK                0
     
    198211        unsigned                refcnt;
    199212        bool                    dirty;
     213
     214        /*
     215         * Cache of the node's last and "current" cluster to avoid some
     216         * unnecessary FAT walks.
     217         */
     218        /* Node's last cluster in FAT. */
     219        bool            lastc_cached_valid;
     220        fat_cluster_t   lastc_cached_value;
     221        /* Node's "current" cluster, i.e. where the last I/O took place. */
     222        bool            currc_cached_valid;
     223        aoff64_t        currc_cached_bn;
     224        fat_cluster_t   currc_cached_value;
    200225} fat_node_t;
    201226
Note: See TracChangeset for help on using the changeset viewer.