Hello, f2fs developers!

I saw commit 9af846486d781a63 "f2fs: add F2FS_IOC_SEC_TRIM_FILE ioctl" in Linux 
kernel
https://github.com/torvalds/linux/commit/9af846486d781a63de025a5f502c515268e48790#

I saw usage of it in Android only
https://android.googlesource.com/platform/system/vold/+/master/secdiscard.cpp

Do I understand correctly that userspace code decides himself where the region 
to erase starts and when to call that ioctl?

I am interested in it to implement realtime secure erase - overwriting files 
with zeros or random data (I am not interestied in sending a discard/trim 
command) - when files are deleted or are removed completely.
This code seems to be a good solution of this problem, but the problem is that 
kernel cannot trigger it by itself.

I think it should be possible to call this from another part of f2fs when a 
file is being edited or unlinked, but I am not sure from where exactly.

F2FS has background housekeeping, it would be nice if it could issue secure 
trim in the background.

Also, I am not sure that it will work with symlinks correctly, for example.

Please give a direction.



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to