Re: PATCH - ext2fs privacy (i.e. secure deletion) patch

Pavel Machek
2004-02-04T00:21:34Z

Hi!

> }
>
> +static inline void destroy_block(struct inode *inode, unsigned long block)
> +{
> +#ifdef CONFIG_EXT2_FS_PRIVACY
> + struct buffer_head * bh;
> +
> + bh = sb_getblk(inode->i_sb, block);
> +
> + memset(bh->b_data, 0x00, bh->b_size);
> +
> + mark_buffer_dirty(bh);
> + wait_on_buffer(bh);
> + brelse(bh);
> +
> + return;
> +#endif
> +}
> +

Perhaps this should still be controlled by (chattr(1)) [its already
documented, just not yet implemented].

When a file with the `s' attribute set is deleted, its blocks
are zeroed and written back to the disk.

...at which point config option is not really neccessary.

Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]