From: Allison Henderson <achender@linux.vnet.ibm.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: 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: Mon, 10 Oct 2011 17:54:30 -0700 [thread overview]
Message-ID: <4E9393C6.8030907@linux.vnet.ibm.com> (raw)
In-Reply-To: <20111010174115.054c3f1f@bike.lwn.net>
On 10/10/2011 04:41 PM, Jonathan Corbet wrote:
> On Mon, 10 Oct 2011 16:35:24 -0700
> Allison Henderson<achender@linux.vnet.ibm.com> wrote:
>
>> On 10/10/2011 12:47 PM, Jonathan Corbet wrote:
>>> One quick question:
>>>
>>> On Fri, 7 Oct 2011 00:11:05 -0700
>>> Allison Henderson<achender@linux.vnet.ibm.com> wrote:
>>>
>>>> + /* Secure delete any blocks still in our range */
>>>> + if (jbd2_pblk_count> 0)
>>>> + err = ext4_secure_delete_pblks(journal->j_inode,
>>>> + jbd2_pblk_start, jbd2_pblk_count);
>>>> +
>>>> +out:
>>>> + spin_unlock(&journal->j_pair_lock);
>>>
>>> ext4_secure_delete_pblks() appears to do its job synchronously - it has
>>> calls to things like sync_dirty_buffer() and such. How can you do that
>>> while holding ->j_pair_lock?
>>>
>>> Thanks,
>>>
>>> jon
>>>
>>
>> Hi Jon,
>>
>> Well j_pair_lock is a lock I added to protect the new list of vfs
>> -> jbd2 block pairs. It is locked by the journal commit thread to
>> update the list when ever a journal block is modified. The above
>> code here is called by the same thread that performs a punch hole or
>> truncate operation, not the journal commit thread. So I'm not
>> immediately seeing why there would be any lock problems. Is there
>> another case I'm missing?
>
> The problem is that ext4_secure_delete_pblks() can sleep, unless I've
> misunderstood things very badly. That's not something you want to do
> while holding a spinlock...
>
> jon
>
Oh I see the concern now. Ok, I can put in a semaphore instead. Thx
for catching that. :)
Allison
next prev parent reply other threads:[~2011-10-11 0:54 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
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 [this message]
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=4E9393C6.8030907@linux.vnet.ibm.com \
--to=achender@linux.vnet.ibm.com \
--cc=corbet@lwn.net \
--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).