Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Minor performance optimizations on fusefs. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
bd4565e9d0b06724c671b68540a0457e |
| User & Date: | drh 2014-06-14 14:15:14.511 |
Context
|
2014-06-14
| ||
| 14:31 | Fix a serious memory leak in the "read" logic of the Fuse Filesystem. ... (check-in: 7a7ef00b35 user: drh tags: trunk) | |
| 14:15 | Minor performance optimizations on fusefs. ... (check-in: bd4565e9d0 user: drh tags: trunk) | |
| 13:59 | Enhance the "fossil whatis" command so that it can accept multiple arguments. ... (check-in: a73da231d8 user: drh tags: trunk) | |
Changes
Changes to src/fusefs.c.
| ︙ | ︙ | |||
130 131 132 133 134 135 136 137 138 139 |
}
fusefs_load_rid(rid, fusefs.az[1]);
if( fusefs.pMan==0 ) return -ENOENT;
pFile = manifest_file_seek(fusefs.pMan, fusefs.az[2], 1);
if( pFile==0 ) return -ENOENT;
stbuf->st_mtime = (fusefs.pMan->rDate - 2440587.5)*86400.0;
if( strcmp(fusefs.az[2], pFile->zName)==0 ){
stbuf->st_mode = S_IFREG |
(manifest_file_mperm(pFile)==PERM_EXE ? 0555 : 0444);
stbuf->st_nlink = 1;
| > | | > > > > | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
}
fusefs_load_rid(rid, fusefs.az[1]);
if( fusefs.pMan==0 ) return -ENOENT;
pFile = manifest_file_seek(fusefs.pMan, fusefs.az[2], 1);
if( pFile==0 ) return -ENOENT;
stbuf->st_mtime = (fusefs.pMan->rDate - 2440587.5)*86400.0;
if( strcmp(fusefs.az[2], pFile->zName)==0 ){
static Stmt q;
stbuf->st_mode = S_IFREG |
(manifest_file_mperm(pFile)==PERM_EXE ? 0555 : 0444);
stbuf->st_nlink = 1;
db_static_prepare(&q, "SELECT size FROM blob WHERE uuid=$uuid");
db_bind_text(&q, "$uuid", pFile->zUuid);
if( db_step(&q)==SQLITE_ROW ){
stbuf->st_size = db_column_int(&q, 0);
}
db_reset(&q);
return 0;
}
n = (int)strlen(fusefs.az[2]);
if( strncmp(fusefs.az[2], pFile->zName, n)!=0 ) return -ENOENT;
if( pFile->zName[n]!='/' ) return -ENOENT;
stbuf->st_mode = S_IFDIR | 0555;
stbuf->st_nlink = 2;
|
| ︙ | ︙ | |||
303 304 305 306 307 308 309 310 311 312 |
fossil_fatal("cannot make directory [%s]", zMountPoint);
}
azNewArgv[0] = g.argv[0];
azNewArgv[1] = doDebug ? "-d" : "-f";
azNewArgv[2] = "-s";
azNewArgv[3] = zMountPoint;
azNewArgv[4] = 0;
fuse_main(4, azNewArgv, &fusefs_methods, NULL);
#endif
}
| > | 308 309 310 311 312 313 314 315 316 317 318 |
fossil_fatal("cannot make directory [%s]", zMountPoint);
}
azNewArgv[0] = g.argv[0];
azNewArgv[1] = doDebug ? "-d" : "-f";
azNewArgv[2] = "-s";
azNewArgv[3] = zMountPoint;
azNewArgv[4] = 0;
g.localOpen = 0; /* Prevent tags like "current" and "prev" */
fuse_main(4, azNewArgv, &fusefs_methods, NULL);
#endif
}
|