Changeset 30527 in vbox
- Timestamp:
- Jun 30, 2010 1:11:55 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 63234
- Location:
- trunk/src/VBox/Additions/solaris/SharedFolders
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_mount.c
r30519 r30527 54 54 " gid=GID set the default file owner group id to GID\n" 55 55 " stat_ttl=TTL set the \"time to live\" (in ms) for the stat caches (default %d)\n" 56 " fsync honor fsync calls instead of ignoring them\n" 56 57 " ttl=TTL set the \"time to live\" to TID for the dentry\n" 57 58 " iocharset CHARSET use the character set CHARSET for i/o operations (default utf8)\n" -
trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.c
r30519 r30527 378 378 if (RT_FAILURE(rc)) 379 379 return (EINVAL); 380 return (0); 381 } 382 383 int 384 sfprov_fsync(sfp_file_t *fp) 385 { 386 int rc; 387 388 rc = vboxCallFlush(&vbox_client, &fp->map, fp->handle); 389 if (RT_FAILURE(rc)) 390 return (EIO); 380 391 return (0); 381 392 } -
trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.h
r30519 r30527 84 84 extern int sfprov_write(sfp_file_t *, char * buffer, uint64_t offset, 85 85 uint32_t *numbytes); 86 extern int sfprov_fsync(sfp_file_t *fp); 86 87 87 88 -
trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c
r30519 r30527 66 66 {"uid", NULL, NULL, MO_HASVALUE, NULL}, 67 67 {"gid", NULL, NULL, MO_HASVALUE, NULL}, 68 {"stat_ttl", NULL, NULL, MO_HASVALUE, NULL} 68 {"stat_ttl", NULL, NULL, MO_HASVALUE, NULL}, 69 {"fsync", NULL, NULL, 0, NULL} 69 70 }; 70 71 … … 230 231 gid_t gid = 0; 231 232 int stat_ttl = DEF_STAT_TTL_MS; 233 int fsync = 0; 232 234 char *optval; 233 235 long val; … … 298 300 (int)val == val) 299 301 stat_ttl = val; 302 303 /* 304 * whether to honor fsync 305 */ 306 if (vfs_optionisset(vfsp, "fsync", &optval)) 307 fsync = 1; 300 308 301 309 /* … … 351 359 sffs->sf_gid = gid; 352 360 sffs->sf_stat_ttl = stat_ttl; 361 sffs->sf_fsync = fsync; 353 362 sffs->sf_share_name = share_name; 354 363 sffs->sf_mntpath = mount_point; -
trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.h
r30519 r30527 32 32 gid_t sf_gid; /* group of all shared folders */ 33 33 int sf_stat_ttl; /* ttl for stat caches (in ms) */ 34 int sf_fsync; /* whether to honor fsync or not */ 34 35 char *sf_share_name; 35 36 char *sf_mntpath; /* name of mount point */ -
trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c
r30519 r30527 1560 1560 sffs_fsync(vnode_t *vp, int flag, cred_t *cr, caller_context_t *ct) 1561 1561 { 1562 #if 01563 1562 sfnode_t *node; 1563 int error; 1564 1564 1565 1565 /* 1566 1566 * Ask the host to sync any data it may have cached for open files. 1567 * I don't think we care about errors.1568 1567 */ 1569 1568 mutex_enter(&sffs_lock); 1570 1569 node = VN2SFN(vp); 1571 if (node->sf_file != NULL) 1572 (void) sfprov_fsync(node->sf_file); 1570 if (node->sf_file == NULL) 1571 error = EBADF; 1572 else if (node->sf_sffs->sf_fsync) 1573 error = sfprov_fsync(node->sf_file); 1574 else 1575 error = 0; 1573 1576 mutex_exit(&sffs_lock); 1574 #endif 1575 return (0); 1577 return (error); 1576 1578 } 1577 1579
Note:
See TracChangeset
for help on using the changeset viewer.