linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Lukáš Czerner" <lczerner@redhat.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 7/7] ext4: add might_sleep() annotations
Date: Tue, 26 Mar 2013 10:48:00 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.00.1303261047210.23176@localhost> (raw)
In-Reply-To: <1364170014-10295-8-git-send-email-tytso@mit.edu>

On Sun, 24 Mar 2013, Theodore Ts'o wrote:

> Date: Sun, 24 Mar 2013 20:06:54 -0400
> From: Theodore Ts'o <tytso@mit.edu>
> To: Ext4 Developers List <linux-ext4@vger.kernel.org>
> Cc: Theodore Ts'o <tytso@mit.edu>
> Subject: [PATCH 7/7] ext4: add might_sleep() annotations

Looks good and useful.

Thanks!
Signed-off-by: Lukas Czerner <lczerner@redhat.com>


> 
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> ---
>  fs/ext4/ext4_jbd2.c | 6 ++++++
>  fs/ext4/mballoc.c   | 4 ++++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c
> index 7058975..0e1dc9e 100644
> --- a/fs/ext4/ext4_jbd2.c
> +++ b/fs/ext4/ext4_jbd2.c
> @@ -43,6 +43,8 @@ handle_t *__ext4_journal_start_sb(struct super_block *sb, unsigned int line,
>  {
>  	journal_t *journal;
>  
> +	might_sleep();
> +
>  	trace_ext4_journal_start(sb, nblocks, _RET_IP_);
>  	if (sb->s_flags & MS_RDONLY)
>  		return ERR_PTR(-EROFS);
> @@ -113,6 +115,8 @@ int __ext4_journal_get_write_access(const char *where, unsigned int line,
>  {
>  	int err = 0;
>  
> +	might_sleep();
> +
>  	if (ext4_handle_valid(handle)) {
>  		err = jbd2_journal_get_write_access(handle, bh);
>  		if (err)
> @@ -209,6 +213,8 @@ int __ext4_handle_dirty_metadata(const char *where, unsigned int line,
>  {
>  	int err = 0;
>  
> +	might_sleep();
> +
>  	if (ext4_handle_valid(handle)) {
>  		err = jbd2_journal_dirty_metadata(handle, bh);
>  		if (err) {
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index ee6614b..36c82a3 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -1011,6 +1011,7 @@ int ext4_mb_init_group(struct super_block *sb, ext4_group_t group)
>  	struct page *page;
>  	int ret = 0;
>  
> +	might_sleep();
>  	mb_debug(1, "init group %u\n", group);
>  	this_grp = ext4_get_group_info(sb, group);
>  	/*
> @@ -1082,6 +1083,7 @@ ext4_mb_load_buddy(struct super_block *sb, ext4_group_t group,
>  	struct ext4_sb_info *sbi = EXT4_SB(sb);
>  	struct inode *inode = sbi->s_buddy_cache;
>  
> +	might_sleep();
>  	mb_debug(1, "load group %u\n", group);
>  
>  	blocks_per_page = PAGE_CACHE_SIZE / sb->s_blocksize;
> @@ -4217,6 +4219,7 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle,
>  	unsigned int inquota = 0;
>  	unsigned int reserv_clstrs = 0;
>  
> +	might_sleep();
>  	sb = ar->inode->i_sb;
>  	sbi = EXT4_SB(sb);
>  
> @@ -4470,6 +4473,7 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode,
>  	int err = 0;
>  	int ret;
>  
> +	might_sleep();
>  	if (bh) {
>  		if (block)
>  			BUG_ON(block != bh->b_blocknr);
> 

  reply	other threads:[~2013-03-26  9:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-25  0:06 [PATCH 0/7] ext4 code simplification and clean ups Theodore Ts'o
2013-03-25  0:06 ` [PATCH 1/7] ext4: collapse handling of data=ordered and data=writeback codepaths Theodore Ts'o
2013-03-27 12:57   ` Lukáš Czerner
2013-03-25  0:06 ` [PATCH 2/7] ext4: fold ext4_generic_write_end() into ext4_write_end() Theodore Ts'o
2013-03-27 12:58   ` Lukáš Czerner
2013-03-27 15:35   ` Jan Kara
2013-03-25  0:06 ` [PATCH 3/7] ext4: fold ext4_alloc_blocks() in ext4_alloc_branch() Theodore Ts'o
2013-03-27 17:01   ` Jan Kara
2013-03-25  0:06 ` [PATCH 4/7] ext4: refactor punch hole code Theodore Ts'o
     [not found]   ` <alpine.LFD.2.00.1303261334060.2455@(none)>
2013-03-27  2:38     ` Theodore Ts'o
2013-03-27 10:49       ` Lukáš Czerner
2013-03-25  0:06 ` [PATCH 5/7] ext4: refactor truncate code Theodore Ts'o
     [not found]   ` <alpine.LFD.2.00.1303271128480.2455@(none)>
2013-03-27 12:36     ` Theodore Ts'o
2013-03-27 13:31       ` Lukáš Czerner
2013-03-25  0:06 ` [PATCH 6/7] ext4: add mutex_is_locked() assertion to ext4_truncate() Theodore Ts'o
2013-03-26  9:31   ` Lukáš Czerner
2013-03-27  2:29     ` Theodore Ts'o
2013-03-25  0:06 ` [PATCH 7/7] ext4: add might_sleep() annotations Theodore Ts'o
2013-03-26  9:48   ` Lukáš Czerner [this message]
2013-03-26  9:49     ` Lukáš Czerner

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=alpine.LFD.2.00.1303261047210.23176@localhost \
    --to=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).