9p: Disable filename tracking by default
This commit is contained in:
parent
c7dda46de1
commit
c3739fc22a
|
@ -195,6 +195,7 @@ Virtio9p.prototype.set_state = function(state)
|
||||||
// Note: dbg_name is only used for debugging messages and may not be the same as the filename,
|
// Note: dbg_name is only used for debugging messages and may not be the same as the filename,
|
||||||
// since it is not synchronised with renames done outside of 9p. Hard-links, linking and unlinking
|
// since it is not synchronised with renames done outside of 9p. Hard-links, linking and unlinking
|
||||||
// operations also mean that having a single filename no longer makes sense.
|
// operations also mean that having a single filename no longer makes sense.
|
||||||
|
// Set TRACK_FILENAMES = true (in config.js) to sync dbg_name during 9p renames.
|
||||||
Virtio9p.prototype.Createfid = function(inodeid, type, uid, dbg_name) {
|
Virtio9p.prototype.Createfid = function(inodeid, type, uid, dbg_name) {
|
||||||
return {inodeid, type, uid, dbg_name};
|
return {inodeid, type, uid, dbg_name};
|
||||||
};
|
};
|
||||||
|
@ -627,8 +628,11 @@ Virtio9p.prototype.ReceiveRequest = function (bufchain) {
|
||||||
this.SendReply(bufchain);
|
this.SendReply(bufchain);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if(TRACK_FILENAMES)
|
||||||
|
{
|
||||||
const newidx = this.fs.Search(this.fids[newdirfid].inodeid, newname);
|
const newidx = this.fs.Search(this.fids[newdirfid].inodeid, newname);
|
||||||
this.update_dbg_name(newidx, newname);
|
this.update_dbg_name(newidx, newname);
|
||||||
|
}
|
||||||
this.BuildReply(id, tag, 0);
|
this.BuildReply(id, tag, 0);
|
||||||
this.SendReply(bufchain);
|
this.SendReply(bufchain);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -34,6 +34,11 @@ var DUMP_GENERATED_WASM = false;
|
||||||
*/
|
*/
|
||||||
var DUMP_UNCOMPILED_ASSEMBLY = false;
|
var DUMP_UNCOMPILED_ASSEMBLY = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @const
|
||||||
|
* More accurate filenames in 9p debug messages at the cost of performance.
|
||||||
|
*/
|
||||||
|
var TRACK_FILENAMES = false;
|
||||||
|
|
||||||
var LOG_LEVEL = LOG_ALL & ~LOG_PS2 & ~LOG_PIT & ~LOG_VIRTIO & ~LOG_9P & ~LOG_PIC &
|
var LOG_LEVEL = LOG_ALL & ~LOG_PS2 & ~LOG_PIT & ~LOG_VIRTIO & ~LOG_9P & ~LOG_PIC &
|
||||||
~LOG_DMA & ~LOG_SERIAL & ~LOG_NET & ~LOG_FLOPPY & ~LOG_DISK & ~LOG_VGA;
|
~LOG_DMA & ~LOG_SERIAL & ~LOG_NET & ~LOG_FLOPPY & ~LOG_DISK & ~LOG_VGA;
|
||||||
|
|
Loading…
Reference in a new issue