linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sunil Mushran <sunil.mushran@oracle.com>
To: djwong@us.ibm.com
Cc: Allison Henderson <achender@linux.vnet.ibm.com>,
	linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [Ext4 Secure Delete 7/7v4] ext4/jbd2: Secure Delete: Secure delete journal blocks
Date: Fri, 07 Oct 2011 12:31:02 -0700	[thread overview]
Message-ID: <4E8F5376.1050009@oracle.com> (raw)
In-Reply-To: <20111007183531.GI12447@tux1.beaverton.ibm.com>

On 10/07/2011 11:35 AM, Darrick J. Wong wrote:
> Um.... I don't think ext4 should be accessing journal internals.  At a bare
> minimum the stuff that mucks around with jbd2 ought to be in fs/jbd2 and
> the ext4 parts stuffed in a wrapper in ext4_jbd2.[ch], since ocfs2 also uses
> jbd2.

I agree.

> I'm also wondering -- this logical<->  journal block mapping doesn't seem to be
> committed to disk anywhere.  What happens if jbd2 crashes before we get to
> zeroing journal blocks?  Specifically, would the journal recovery code know
> that a given journal block also needs secure deletion?
>
> Here's a counterproposal: What if ext4 told jbd2 which blocks need to be
> securely deleted while ext4 is creating the transactions?  jbd2 could then set
> a JBD2_FLAG_SECURE_DELETE flag in journal_block_tag_t.t_flags (the descriptor
> block), which would tell the recovery and commit code that the associated
> journal block needs secure deletion when processing is complete.  I _think_ you
> could just extend the functions called by ext4_jbd2.c to take a flags
> parameter.  Does this sound better?  Or even sane? :)
>
> (Not sure if ocfs2 cares about secure delete at all.)

It looks like a useful feature. Though I would be wary of wiring this in
the journaling layer. Mainly for performance reasons.

In ocfs2, we log the truncated bits to a node specific system file called
truncate_log. These bits are flushed to the global bitmap periodically
by a queued task. We do this because taking a cluster lock on the global
bitmap is very expensive.

If I were doing this, I would extend this scheme to handle secure deletes.
The queued task would zero out the clusters before clearing the bits
in the global bitmap.

  reply	other threads:[~2011-10-07 19:31 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-07  7:10 [Ext4 Secure Delete 0/7 v4] Ext4 secure delete Allison Henderson
2011-10-07  7:10 ` [Ext4 Secure Delete 1/7v4] ext4: Secure Delete: Add new EXT4_SECRM_RANDOM_FL flag Allison Henderson
2011-10-07 17:02   ` Darrick J. Wong
2011-10-07 17:14     ` Allison Henderson
2011-10-07  7:11 ` [Ext4 Secure Delete 2/7v4] ext4: Secure Delete: Add ext4_ind_hole_lookup function Allison Henderson
2011-10-07 17:47   ` Darrick J. Wong
2011-10-07 23:10     ` Allison Henderson
2011-10-07  7:11 ` [Ext4 Secure Delete 3/7v4] ext4: Secure Delete: Add secure delete functions Allison Henderson
2011-10-07 17:19   ` Allison Henderson
2011-10-07 18:07   ` Darrick J. Wong
2011-10-07 23:08     ` Allison Henderson
2011-10-07  7:11 ` [Ext4 Secure Delete 4/7v4] ext4: Secure Delete: Secure delete file data Allison Henderson
2011-10-07  7:11 ` [Ext4 Secure Delete 5/7v4] ext4: Secure Delete: Secure delete directory entry Allison Henderson
2011-10-07 17:22   ` Darrick J. Wong
2011-10-07 17:59     ` Allison Henderson
2011-10-07  7:11 ` [Ext4 Secure Delete 6/7v4] ext4: Secure Delete: Secure delete meta data blocks Allison Henderson
2011-10-07  7:11 ` [Ext4 Secure Delete 7/7v4] ext4/jbd2: Secure Delete: Secure delete journal blocks Allison Henderson
2011-10-07 18:35   ` Darrick J. Wong
2011-10-07 19:31     ` Sunil Mushran [this message]
2011-10-07 19:54     ` Eric Sandeen
2011-10-07 20:14       ` Allison Henderson
2011-10-07 19:55     ` Allison Henderson
2011-10-07 20:58       ` Darrick J. Wong
2011-10-08  0:06         ` Allison Henderson
2011-10-10 19:47   ` Jonathan Corbet
2011-10-10 23:35     ` Allison Henderson
2011-10-10 23:41       ` Jonathan Corbet
2011-10-11  0:54         ` Allison Henderson
2011-10-10 20:00   ` Jonathan Corbet
2011-10-10 23:36     ` Allison Henderson
2011-10-07 15:21 ` [Ext4 Secure Delete 0/7 v4] Ext4 secure delete Andreas Dilger
2011-10-07 17:07   ` Allison Henderson
2011-10-10 17:20     ` Allison Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E8F5376.1050009@oracle.com \
    --to=sunil.mushran@oracle.com \
    --cc=achender@linux.vnet.ibm.com \
    --cc=djwong@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).