Bug 1878311: Sync obfsDeviceCharacteristics method with sqlite obfsvfs.c.r=dom-storage-reviewers,janv
This change seeks to sync the changes in sqlite's obfsvfs.c, specifically in method obfsDeviceCharacteristics. This fixes the issue where SQLITE_DIRECT_OVEFLOW_READ option was causing issues for non-standard VFSes. Sqlite has fixed this issue in 3.47.1 release by introducing SQLITE_IOCAP_SUBPAGE_READ flag, which allows VFS to signal that it cannot handle unaligned reads. Differential Revision: https://phabricator.services.mozilla.com/D230671
This commit is contained in:
@@ -445,8 +445,11 @@ static int obfsSectorSize(sqlite3_file* pFile) {
|
||||
** Return the device characteristic flags supported by an obfuscated file.
|
||||
*/
|
||||
static int obfsDeviceCharacteristics(sqlite3_file* pFile) {
|
||||
int dc;
|
||||
pFile = ORIGFILE(pFile);
|
||||
return pFile->pMethods->xDeviceCharacteristics(pFile);
|
||||
dc = pFile->pMethods->xDeviceCharacteristics(pFile);
|
||||
return dc & ~SQLITE_IOCAP_SUBPAGE_READ; /* All except the
|
||||
SQLITE_IOCAP_SUBPAGE_READ bit */
|
||||
}
|
||||
|
||||
/* Create a shared memory file mapping */
|
||||
|
||||
Reference in New Issue
Block a user