Changeset 1fbe064b in mainline for uspace/srv/fs/fat/fat_ops.c


Ignore:
Timestamp:
2009-06-26T21:34:47Z (15 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
00fe6bb
Parents:
af65b72
Message:

Allow libblock to operate in write-through mode. With 'wtcache' mount option, FAT sets write-through mode on the cache.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat_ops.c

    raf65b72 r1fbe064b  
    771771{
    772772        dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
     773        enum cache_mode cmode;
    773774        fat_bs_t *bs;
    774775        uint16_t bps;
     
    798799        opts[size] = '\0';
    799800
     801        /* Check for option enabling write through. */
     802        if (str_cmp(opts, "wtcache") == 0)
     803                cmode = CACHE_MODE_WT;
     804        else
     805                cmode = CACHE_MODE_WB;
     806
    800807        /* initialize libblock */
    801808        rc = block_init(dev_handle, BS_SIZE);
     
    827834
    828835        /* Initialize the block cache */
    829         rc = block_cache_init(dev_handle, bps, 0 /* XXX */);
     836        rc = block_cache_init(dev_handle, bps, 0 /* XXX */, cmode);
    830837        if (rc != EOK) {
    831838                block_fini(dev_handle);
Note: See TracChangeset for help on using the changeset viewer.