yuheho7749 / uwufs

GNU General Public License v3.0
1 stars 1 forks source link

Truncate (regular files) #29

Open yuheho7749 opened 6 days ago

PigBrainOverflow commented 5 days ago

I'm working on remove_dblk_no_from_inode() (including indirect blocks), which may support your truncate().

yuheho7749 commented 4 days ago

That could be used for small truncates, but I also have __free_{single,double,triple}_indirect_blk helper functions to remove larger chunks on my development branch. Rather, the remove_dblk will be really useful for deleting a directory entry where it at most frees one blk.

PigBrainOverflow commented 4 days ago

Sure. Great! I planned to write a large range remove (like remove all dblks after a start_index), but seems you will use several more fine controlled helpers, so I will postpone writing that. (Tell me if you really need it).