Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd: bring FileJournal in sync with giant #2764

Merged
merged 8 commits into from Nov 6, 2014
Merged

osd: bring FileJournal in sync with giant #2764

merged 8 commits into from Nov 6, 2014

Conversation

liewegas
Copy link
Member

  • revert an incorrect backport (it was a wip branch/patch)
  • backport the series of aio header changes, since they are all dependent and
    fixing each other

I'm not sure what the original problem Loic saw was (that prompted the
backport), but hopefully this series also addresses it...

liewegas and others added 8 commits October 21, 2014 06:53
When closing journal, it should check must_write_header and update
journal header if must_write_header alreay set.
It can reduce the nosense journal-replay after restarting osd.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
Reviewed-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 5bf472a)
This can happen if we write a journal but no events.

Reported-by: Somnath Roy <somnath.roy@sandisk.com>
Reported-by: Ma, Jianpeng <jianpeng.ma@intel.com>
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 57778e2)
When reading journal-header, it should firstly check the result of
pread and then do decoce operation.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
(cherry picked from commit c8e2b89)
If define HAVE_LIBAIO, it alloc related resouces. But itt don't check whether
using aio mode. Only using aio it alloc the related resources.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
(cherry picked from commit a66a493)
…nal.

For jouranl-aio-mode when closing journal, the write_finish_thread_entry may exit before
write_thread_entry. This cause no one wait last aios to complete.
On some platform, after that the journal-header on journal corrupted.
To avoid this, when closing jouranl we don't use aio.

Fixes: 9073
Reported-by: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Tested-by: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
(cherry picked from commit e870fd0)
And not an error code to be converted with cpp_strerror()

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 7827e00)
…ng joural corrupt.

In func FileJournal::dump, it always using seq=0 as last-seq and it can
misjudge the journal corrupt.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
(cherry picked from commit 5f65b4d)
@ghost
Copy link

ghost commented Oct 21, 2014

http://tracker.ceph.com/issues/9073 was the issue and the corresponding pull request was #2724 . Note that the issue was observed on firefly as described here http://tracker.ceph.com/issues/9768. The commit ecff376 fixes http://tracker.ceph.com/issues/9073 . I originally cherry picked ecff376 but then got careless and picked another one thinking it was in master.

@ghost
Copy link

ghost commented Oct 21, 2014

👍

@athanatos
Copy link
Contributor

wip-sam-firefly-testing

@ghost ghost added the core label Nov 5, 2014
athanatos pushed a commit that referenced this pull request Nov 6, 2014
osd: bring FileJournal in sync with giant

Reviewed-by: Samuel Just <sjust@redhat.com>
@athanatos athanatos merged commit 3f9bf73 into firefly Nov 6, 2014
@athanatos athanatos deleted the wip-9851 branch November 6, 2014 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants