From: Smart Weblications GmbH - Florian Wiessner <f.wiessner@smart-weblications.de>
To: stable@vger.kernel.org
Cc: ocfs2-devel@oss.oracle.com, linux-fsdevel@vger.kernel.org,
lizf@kernel.org, joseph.qi@huawei.com, jlbec@evilplan.org,
mfasheh@suse.com, lizefan@huawei.com, pieter@boesman.nl,
josh@joshtriplett.orgjlbec@evilplan.org
Subject: [Ocfs2-devel] ocfs2_link:812 ERROR: status = -2 - Re: Linux 3.17.4
Date: Thu, 27 Nov 2014 17:50:23 +0100 [thread overview]
Message-ID: <5477564F.2070908@smart-weblications.de> (raw)
In-Reply-To: <20141121201253.GA8623@kroah.com>
Am 21.11.2014 21:12, schrieb Greg KH:
> I'm announcing the release of the 3.17.4 kernel.
>
> All users of the 3.17 kernel series must upgrade.
>
When using ocfs2 on 3.17.4 (i have seen this since 3.14) and
mount-bind ocfs2 to a lxc-container, when postfix inside the lxc tries to
write mails to ocfs2 dir using virtual transport, kernel says:
[ 3812.352564] (virtual,25186,3):ocfs2_link:812 ERROR: status = -2
In 3.12 this did _NOT_ happen.
This code (from postfix virtual transport program 'virtual' seems to cause the
kernel message:
newfile = concatenate(newdir, STR(buf), (char *) 0);
if ((mail_copy_status = mail_copy(COPY_ATTR(state.msg_attr),
dst, copy_flags, "\n",
why)) == 0) {
if (sane_link(tmpfile, newfile) < 0
&& (errno != ENOENT
|| (make_dirs(curdir, 0700), make_dirs(newdir, 0700)) < 0
|| sane_link(tmpfile, newfile) < 0)) {
dsb_simple(why, mbox_dsn(errno, "4.2.0"),
"create maildir file %s: %m", newfile);
mail_copy_status = MAIL_COPY_STAT_WRITE;
}
}
if (unlink(tmpfile) < 0)
msg_warn("remove %s: %m", tmpfile);
}
/* sane_link - sanitize link() error returns */
int sane_link(const char *from, const char *to)
{
const char *myname = "sane_link";
int saved_errno;
struct stat from_st;
struct stat to_st;
/*
* Normal case: link() succeeds.
*/
if (link(from, to) >= 0)
return (0);
/*
* Woops. Save errno, and see if the error is an NFS artefact. If it is,
* pretend the error never happened.
*/
saved_errno = errno;
if (stat(from, &from_st) >= 0 && stat(to, &to_st) >= 0
&& from_st.st_dev == to_st.st_dev
&& from_st.st_ino == to_st.st_ino) {
msg_info("%s(%s,%s): worked around spurious NFS error",
myname, from, to);
return (0);
}
/*
* Nope, it didn't. Restore errno and report the error.
*/
errno = saved_errno;
return (-1);
}
This seems like a regression to me since this used to work in 3.12.33
After the error, the mail is in /tmp/ of the mailbox but not moved to the /new/
dir. Also, courier-imapd fails to move mails from inbox to subfolders with the
same error message, leaving the mails to move in /tmp/ so i suspect
sane_link(tempfile, newfile) to have a problem within the current ocfs2_link().
[ 3337.084292] (imapd,5766,5):ocfs2_link:812 ERROR: status = -2
Please help!
--
Mit freundlichen Gr??en,
Florian Wiessner
Smart Weblications GmbH
Martinsberger Str. 1
D-95119 Naila
fon.: +49 9282 9638 200
fax.: +49 9282 9638 205
24/7: +49 900 144 000 00 - 0,99 EUR/Min*
http://www.smart-weblications.de
--
Sitz der Gesellschaft: Naila
Gesch?ftsf?hrer: Florian Wiessner
HRB-Nr.: HRB 3840 Amtsgericht Hof
*aus dem dt. Festnetz, ggf. abweichende Preise aus dem Mobilfunknetz
WARNING: multiple messages have this Message-ID (diff)
From: Smart Weblications GmbH - Florian Wiessner <f.wiessner@smart-weblications.de>
To: stable@vger.kernel.org
Cc: ocfs2-devel@oss.oracle.com, linux-fsdevel@vger.kernel.org,
lizf@kernel.org, joseph.qi@huawei.com, jlbec@evilplan.org,
mfasheh@suse.com, lizefan@huawei.com, pieter@boesman.nl,
josh@joshtriplett.org, jlbec@evilplan.org
Subject: ocfs2_link:812 ERROR: status = -2 - Re: Linux 3.17.4
Date: Thu, 27 Nov 2014 17:50:23 +0100 [thread overview]
Message-ID: <5477564F.2070908@smart-weblications.de> (raw)
In-Reply-To: <20141121201253.GA8623@kroah.com>
Am 21.11.2014 21:12, schrieb Greg KH:
> I'm announcing the release of the 3.17.4 kernel.
>
> All users of the 3.17 kernel series must upgrade.
>
When using ocfs2 on 3.17.4 (i have seen this since 3.14) and
mount-bind ocfs2 to a lxc-container, when postfix inside the lxc tries to
write mails to ocfs2 dir using virtual transport, kernel says:
[ 3812.352564] (virtual,25186,3):ocfs2_link:812 ERROR: status = -2
In 3.12 this did _NOT_ happen.
This code (from postfix virtual transport program 'virtual' seems to cause the
kernel message:
newfile = concatenate(newdir, STR(buf), (char *) 0);
if ((mail_copy_status = mail_copy(COPY_ATTR(state.msg_attr),
dst, copy_flags, "\n",
why)) == 0) {
if (sane_link(tmpfile, newfile) < 0
&& (errno != ENOENT
|| (make_dirs(curdir, 0700), make_dirs(newdir, 0700)) < 0
|| sane_link(tmpfile, newfile) < 0)) {
dsb_simple(why, mbox_dsn(errno, "4.2.0"),
"create maildir file %s: %m", newfile);
mail_copy_status = MAIL_COPY_STAT_WRITE;
}
}
if (unlink(tmpfile) < 0)
msg_warn("remove %s: %m", tmpfile);
}
/* sane_link - sanitize link() error returns */
int sane_link(const char *from, const char *to)
{
const char *myname = "sane_link";
int saved_errno;
struct stat from_st;
struct stat to_st;
/*
* Normal case: link() succeeds.
*/
if (link(from, to) >= 0)
return (0);
/*
* Woops. Save errno, and see if the error is an NFS artefact. If it is,
* pretend the error never happened.
*/
saved_errno = errno;
if (stat(from, &from_st) >= 0 && stat(to, &to_st) >= 0
&& from_st.st_dev == to_st.st_dev
&& from_st.st_ino == to_st.st_ino) {
msg_info("%s(%s,%s): worked around spurious NFS error",
myname, from, to);
return (0);
}
/*
* Nope, it didn't. Restore errno and report the error.
*/
errno = saved_errno;
return (-1);
}
This seems like a regression to me since this used to work in 3.12.33
After the error, the mail is in /tmp/ of the mailbox but not moved to the /new/
dir. Also, courier-imapd fails to move mails from inbox to subfolders with the
same error message, leaving the mails to move in /tmp/ so i suspect
sane_link(tempfile, newfile) to have a problem within the current ocfs2_link().
[ 3337.084292] (imapd,5766,5):ocfs2_link:812 ERROR: status = -2
Please help!
--
Mit freundlichen Grüßen,
Florian Wiessner
Smart Weblications GmbH
Martinsberger Str. 1
D-95119 Naila
fon.: +49 9282 9638 200
fax.: +49 9282 9638 205
24/7: +49 900 144 000 00 - 0,99 EUR/Min*
http://www.smart-weblications.de
--
Sitz der Gesellschaft: Naila
Geschäftsführer: Florian Wiessner
HRB-Nr.: HRB 3840 Amtsgericht Hof
*aus dem dt. Festnetz, ggf. abweichende Preise aus dem Mobilfunknetz
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-11-27 16:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-21 20:12 Linux 3.17.4 Greg KH
2014-11-21 20:13 ` Greg KH
2014-11-27 1:01 ` [Ocfs2-devel] ocfs2_link:812 ERROR: status = -2 - " Smart Weblications GmbH - Florian Wiessner
2014-11-27 1:01 ` Smart Weblications GmbH - Florian Wiessner
2014-11-27 16:50 ` Smart Weblications GmbH - Florian Wiessner [this message]
2014-11-27 16:50 ` Smart Weblications GmbH - Florian Wiessner
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=5477564F.2070908@smart-weblications.de \
--to=f.wiessner@smart-weblications.de \
--cc=jlbec@evilplan.org \
--cc=joseph.qi@huawei.com \
--cc=josh@joshtriplett.orgjlbec \
--cc=linux-fsdevel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=lizf@kernel.org \
--cc=mfasheh@suse.com \
--cc=ocfs2-devel@oss.oracle.com \
--cc=pieter@boesman.nl \
--cc=stable@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.