[CONFIDENTIAL]
======================================================================
  Additional features related to the exFAT filesystem

  Sony Group Corporation

======================================================================

Table of contents
    1. Overview
    2. Additional features
    3. Known issues
    4. Change history

1. Overview
===========

This document describes additional features for the exFAT filesystem.
All additional features can be enabled/disabled by kernel configuration.

Please refer to document belonging to kernel, site information such
as Linux Kernel Newbies (http://kernelnewbies.org/), and commit log
of kernel regarding the existing features.


2. Additional features
======================

All additional features are described in the order of kernel
configurations. These configurations can be seen as follows:

    File systems  --->
    `-- DOS/FAT/EXFAT/NT Filesystems  --->
        |-- <*> exFAT filesystem support
        `-- [*] exFAT batch_sync support (CONFIG_SNSC_FS_EXFAT_BATCH_SYNC)

All features cannot be chosen if configuration of the exFAT file system
(CONFIG_EXFAT_FS) is disabled.


CONFIG_SNSC_FS_EXFAT_BATCH_SYNC

  It adds mount option "batch_sync" to the exFAT filesystem.

  Like the "sync" mount option, "batch_sync" also ensures filesystem consistency
  even if there is a power loss or a kernel panic. This mount option defers
  issuing block IO as much as possible. (File updates are deferred till close)
  therefore, it reduces the number of block IO compared to "sync".

  Furthermore, this mount option strictly enforce the following block IO
  ordering to ensure filesystem consistency in power loss or kernel panic.

  (A) In case of allocation cluster
    1. File contents
    2. Allocation Bitmap
    3. FAT (newly allocated clusters)
    4. FAT (The others)
    5. Directory

  (B) In case of release cluster
    1. Directory
    2. FAT
    3. Allocation Bitmap


  Usage:
    For example, If you want to use batch_sync at /dev/mmcblk0p1 mounting to /mnt:

      # mount -t exfat -o batch_sync /dev/mmcblk0p1 /mnt

    For example, If you want to check if batch_sync is enabled at /dev/mmcblk0p1:

      # mount | grep /dev/mmcblk0p1
      /dev/mmcblk0p1 on /mnt type exfat (rw,batch_sync,relatime,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro)

    It is disabled by default in the mount options above.

    Note: This mount option can't be used with "sync" and "dirsync".


3. Known issues
===============

CONFIG_SNSC_FS_EXFAT_BATCH_SYNC

  (1) batch_sync doesn't support hardware cache
      If storage device has hardware cache, batch_sync can't enforce order of block IO
      correctly. Therefore, batch_sync can't ensure filesystem consistency in power loss
      or kernel panic.

  (2) batch_sync doesn't handle remount
      The exFAT filesystem can't handle exFAT-specific mount option during remount.
      Therefore, batch_sync is disabled in remount filesystem regardless of mount option.


4. Change history
==================
  Version	date		Cause
  0.1		2022/05/11	The first version
