/ Check-in [4477e60c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Do not set device-capabilities flags SEQUENTIAL or SAFE_APPEND for f2fs file-systems.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | batch-atomic-write
Files: files | file ages | folders
SHA3-256:4477e60cd801dab7a8aec12c5bc5e81e774bedbfed38abbc8eb8b37336141a44
User & Date: dan 2017-07-27 18:34:00
Context
2017-07-28
01:53
Add the SQLITE_ENABLE_BATCH_ATOMIC_WRITE macro to ctime.c check-in: 67bad7fb user: drh tags: batch-atomic-write
2017-07-27
18:34
Do not set device-capabilities flags SEQUENTIAL or SAFE_APPEND for f2fs file-systems. check-in: 4477e60c user: dan tags: batch-atomic-write
2017-07-22
20:12
Add a test for the outcome of a process crash within an xWrite VFS method call. check-in: eb871800 user: dan tags: batch-atomic-write
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
#if defined(__linux__) && defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)
    int res;
    u32 f = 0;

    /* Check for support for F2FS atomic batch writes. */
    res = osIoctl(pFd->h, F2FS_IOC_GET_FEATURES, &f);
    if( res==0 && (f & F2FS_FEATURE_ATOMIC_WRITE) ){
      pFd->deviceCharacteristics = 
        SQLITE_IOCAP_BATCH_ATOMIC |
        SQLITE_IOCAP_ATOMIC |
        SQLITE_IOCAP_SEQUENTIAL |
        SQLITE_IOCAP_SAFE_APPEND;
    }
#endif /* __linux__ && SQLITE_ENABLE_BATCH_ATOMIC_WRITE */

    /* Set the POWERSAFE_OVERWRITE flag if requested. */
    if( pFd->ctrlFlags & UNIXFILE_PSOW ){
      pFd->deviceCharacteristics |= SQLITE_IOCAP_POWERSAFE_OVERWRITE;
    }







|
<
<
<
<







3906
3907
3908
3909
3910
3911
3912
3913




3914
3915
3916
3917
3918
3919
3920
#if defined(__linux__) && defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)
    int res;
    u32 f = 0;

    /* Check for support for F2FS atomic batch writes. */
    res = osIoctl(pFd->h, F2FS_IOC_GET_FEATURES, &f);
    if( res==0 && (f & F2FS_FEATURE_ATOMIC_WRITE) ){
      pFd->deviceCharacteristics = SQLITE_IOCAP_BATCH_ATOMIC;




    }
#endif /* __linux__ && SQLITE_ENABLE_BATCH_ATOMIC_WRITE */

    /* Set the POWERSAFE_OVERWRITE flag if requested. */
    if( pFd->ctrlFlags & UNIXFILE_PSOW ){
      pFd->deviceCharacteristics |= SQLITE_IOCAP_POWERSAFE_OVERWRITE;
    }