You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In one of my projects i'm aggregating a few mount points together so i'm able to scale disk operations beyond one partition - e.g. switch to another mountpoint if primary disk is full.
To test this i would create a directory structure which requires different quotas per virtual mount points.
With a bit guidance i could provide the code changes.
My modification would be to add setQuota($quotainstance) and getQuota() to vfsStreamAbstractContent whereas getQuota recursively searches its parent paths for a quota instance.
The method getQuota would then be used in vfsStreamWrapper methods stream_write and stream_truncate right before overall root-quota is used
and setQuota would get used in newDirectory by adding a new quota parameter in bytes.
The text was updated successfully, but these errors were encountered:
This would be an interesting feature, but implementing it the way you suggest would make the internals really complicated. Currently instances of vfsStreamContent just know their parent path, but for good reason don't have a reference to their parent which I don't want to change. I also don't want them to access the root directory to get their parent from there - this would create a tight coupling between things that shouldn't be coupled at all.
Having said that, I think to enable this feature it would be a good idea to introduce the concept of partitions to vfsStream. Quotas can then be bound to partitions, and vfsStreamWrapper could work with partitions, whereas vfsStreamContent could stay decoupled from the whole quota concept. I didn't think this through completely, but I guess this would introduce some major backward incompatible changes, so it could be an idea for version 2.
In one of my projects i'm aggregating a few mount points together so i'm able to scale disk operations beyond one partition - e.g. switch to another mountpoint if primary disk is full.
To test this i would create a directory structure which requires different quotas per virtual mount points.
With a bit guidance i could provide the code changes.
My modification would be to add
setQuota($quotainstance)
andgetQuota()
tovfsStreamAbstractContent
whereasgetQuota
recursively searches its parent paths for a quota instance.The method
getQuota
would then be used invfsStreamWrapper
methodsstream_write
andstream_truncate
right before overall root-quota is usedand
setQuota
would get used innewDirectory
by adding a new quota parameter in bytes.The text was updated successfully, but these errors were encountered: