All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: m@thieu.so
Cc: Chris Gentile <cnjgentile@gmail.com>,
	Evgeniy <iron.udjin@gmail.com>,
	reiserfs-devel <reiserfs-devel@vger.kernel.org>
Subject: Re: Reiser4 GIT and Kernel 3.11 patchs
Date: Mon, 23 Sep 2013 21:01:31 +0200	[thread overview]
Message-ID: <5240900B.90800@gmail.com> (raw)
In-Reply-To: <20130919151403.Horde.VoBIXKovROrctv021aPeYw7@mail.thieu.so>

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

On 09/19/2013 05:14 PM, m@thieu.so wrote:
[...]
>
> For the undeletable directory bug, i was able to reproduce it with 
> 3.10 simply by copying portage on a r4 partition, do ctrl-c during 
> copy and rm -rf it right after.


Unfortunately, I can not reproduce this.
Could you please try the attached patch? Does it help?
Better, on not important data...

Thanks,
Edward.

[-- Attachment #2: reiser4-fix-create-unlink-race.patch --]
[-- Type: text/x-patch, Size: 1159 bytes --]

Make reiser4_link(), reiser4_unlink() return error,
when REISER4_IMMUTABLE inode flag is set.

Signed-off-by: Edward Shishkin <edward.shishkin@gmail.com>
---
 fs/reiser4/plugin/inode_ops.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

--- linux-3.11.1.orig/fs/reiser4/plugin/inode_ops.c
+++ linux-3.11.1/fs/reiser4/plugin/inode_ops.c
@@ -151,8 +151,11 @@ int reiser4_link_common(struct dentry *e
 	assert("nikita-1434", object != NULL);
 
 	/* check for race with create_object() */
-	reiser4_check_immutable(object);
-
+	if (reiser4_inode_get_flag(object, REISER4_IMMUTABLE)) {
+		context_set_commit_async(ctx);
+		reiser4_exit_context(ctx);
+		return RETERR(-E_REPEAT);
+	}
 	parent_dplug = inode_dir_plugin(parent);
 
 	memset(&entry, 0, sizeof entry);
@@ -876,7 +879,8 @@ static int unlink_check_and_grab(struct
 	fplug = inode_file_plugin(child);
 
 	/* check for race with create_object() */
-	reiser4_check_immutable(child);
+	if (reiser4_inode_get_flag(child, REISER4_IMMUTABLE))
+		return RETERR(-E_REPEAT);
 
 	/* object being deleted should have stat data */
 	assert("vs-949", !reiser4_inode_get_flag(child, REISER4_NO_SD));

  parent reply	other threads:[~2013-09-23 19:01 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19 15:14 Reiser4 GIT and Kernel 3.11 patchs m
2013-09-19 15:55 ` Mathieu Belanger
2013-09-19 16:08   ` Christopher Gentile
2013-09-19 16:21   ` Christopher Gentile
2013-09-19 18:09     ` Mathieu Belanger
2013-09-19 20:05       ` Edward Shishkin
2013-09-19 18:16   ` Christopher Gentile
2013-09-23 19:01 ` Edward Shishkin [this message]
2013-09-23 21:21   ` Edward Shishkin
2013-09-24  9:08   ` Chris Gentile
2013-09-25  0:31     ` Mathieu Belanger
2013-09-25  0:34       ` Chris Gentile
2013-09-28 16:06         ` Chris Gentile
2013-09-25  4:47       ` Chris Gentile
  -- strict thread matches above, loose matches on Subject: below --
2013-09-28 16:20 m
2013-09-28 17:43 ` Chris Gentile
     [not found]   ` <20130928174954.Horde.5eBFCXLtsWAtF9zNtt95nQ1@mail.thieu.so>
2013-09-28 18:22     ` Chris Gentile
2013-09-17 18:15 Mathieu Belanger
2013-09-17 19:52 ` Edward Shishkin
2013-09-17 20:24   ` Evgeniy
2013-09-17 20:37     ` Chris Gentile
2013-09-17 21:02       ` Evgeniy
2013-09-17 21:15         ` Mathieu Belanger
2013-09-17 21:22           ` Chris Gentile
2013-09-17 22:02           ` Chris Gentile
2013-09-18  3:44             ` Mathieu Belanger
2013-09-18  5:52               ` Chris Gentile
2013-09-18  6:14               ` Chris Gentile
2013-09-18  6:20                 ` Mathieu Belanger
2013-09-18  6:47                   ` Chris Gentile
2013-09-18  6:54                     ` Mathieu Belanger
2013-09-18  6:59                       ` Chris Gentile
2013-09-18 13:20                         ` Evgeniy
2013-09-18 13:27                           ` Chris Gentile
2013-09-18 13:30                           ` Chris Gentile
2013-09-18 14:02                             ` Evgeniy
2013-09-18 15:53                               ` Evgeniy
2013-09-18 16:09                                 ` Mathieu Belanger
2013-09-18 16:20                                   ` Mathieu Belanger
2013-09-18 16:24                                   ` Evgeniy
2013-09-18 16:39                                     ` Mathieu Belanger
2013-09-18 18:02                                       ` Evgeniy
2013-09-18 18:20                                         ` Mathieu Belanger
2013-09-18 18:36                                           ` Mathieu Belanger
2013-09-18 23:24                                         ` Mathieu Belanger
2013-09-18 23:36                                           ` Edward Shishkin
2013-09-19  1:25                                           ` Mathieu Belanger
     [not found]                                             ` <CADW=+3=znbq=KDqCmzQ_eq=V_9i4VpHj_uOcB3joJbZUZPNtdA@mail.gmail.com>
2013-09-19  5:45                                               ` Mathieu Belanger
2013-09-19  9:12                                                 ` Edward Shishkin
2013-09-19 10:10                                                   ` Evgeniy
2013-09-19 10:23                                                     ` Evgeniy
2013-09-19 10:24                                                     ` Edward Shishkin
2013-09-19 15:02                                                   ` Christopher Gentile
2013-09-19 14:43                                           ` Christopher Gentile
     [not found]         ` <5238C666.6080703@gmail.com>
2013-09-17 21:22           ` Evgeniy
2013-09-17 21:25             ` Chris Gentile
2013-09-17 21:35               ` Evgeniy
     [not found]   ` <CAL2jS+mhmvmse7UqK4Xa0pYLSBJ9mfBDohKYFKdjzpAbL-=prA@mail.gmail.com>
2013-09-17 23:13     ` Edward Shishkin

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=5240900B.90800@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=cnjgentile@gmail.com \
    --cc=iron.udjin@gmail.com \
    --cc=m@thieu.so \
    --cc=reiserfs-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.