<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/cluster/afr/src, branch v3.3.2qa1</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>cluster/afr: Try for all locks before failing in rename</title>
<updated>2013-04-10T08:26:09+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2013-03-18T11:30:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=650708316527346ae47ff129fba55f455f2fcfb4'/>
<id>650708316527346ae47ff129fba55f455f2fcfb4</id>
<content type='text'>
Change-Id: If0e917e5d4914f6807b4a96f81668a467b15d0df
BUG: 922809
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4689
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: If0e917e5d4914f6807b4a96f81668a467b15d0df
BUG: 922809
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4689
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/afr: Preserve mtime in self-heal</title>
<updated>2013-04-10T07:41:19+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2013-03-08T09:50:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=26ab9cfeca978cc5459d1638fb1628051143eab9'/>
<id>26ab9cfeca978cc5459d1638fb1628051143eab9</id>
<content type='text'>
Problem:
Data self-heal may choose sink iatt to set mtimes.
This happens because after syncing of data is done
self-heal does one more xattrops/fstat to determine
sources sinks to set the inode-ctx. Since this is done
after data syncing and erase of xattrs, old source and
old sink are now sources, but the mtimes of them differ.
Old code just takes the first source from the list and
update mtimes, which could be sink before the self-heal
started.

Fix:
Set mtime from 'sources before syncing'.

Change-Id: Id769e1b99aa4f041eaee775f64cbf2c57b799723
BUG: 918437
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4658
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-on: http://review.gluster.org/4664
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Data self-heal may choose sink iatt to set mtimes.
This happens because after syncing of data is done
self-heal does one more xattrops/fstat to determine
sources sinks to set the inode-ctx. Since this is done
after data syncing and erase of xattrs, old source and
old sink are now sources, but the mtimes of them differ.
Old code just takes the first source from the list and
update mtimes, which could be sink before the self-heal
started.

Fix:
Set mtime from 'sources before syncing'.

Change-Id: Id769e1b99aa4f041eaee775f64cbf2c57b799723
BUG: 918437
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4658
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-on: http://review.gluster.org/4664
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/afr: Filter O_TRUNC in afr-fix-open</title>
<updated>2012-11-05T10:27:42+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2012-11-01T11:49:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=775626f44f30e38cccd5efcd959b61f4f0f61969'/>
<id>775626f44f30e38cccd5efcd959b61f4f0f61969</id>
<content type='text'>
RCA:
When open was done while a brick is down, afr opens the file after
the brick comes backup. If this happens after the self-heal on the file
is completed by self-heald etc, the file will end up in truncated state.

Fix:
Filter O_TRUNC while afr-fix-open because afr_open turns O_TRUNC
into truncate transaction, so there will be pending changelog for
the subvolume on which open fails.

Testing:
Had to simulate the race by stopping fix-open until self-heald completes
self-heal on the file after brick online.

Change-Id: If99eb3eb272dea0ed8c7b754dce675eb6efaf802
BUG: 841840
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4147
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RCA:
When open was done while a brick is down, afr opens the file after
the brick comes backup. If this happens after the self-heal on the file
is completed by self-heald etc, the file will end up in truncated state.

Fix:
Filter O_TRUNC while afr-fix-open because afr_open turns O_TRUNC
into truncate transaction, so there will be pending changelog for
the subvolume on which open fails.

Testing:
Had to simulate the race by stopping fix-open until self-heald completes
self-heal on the file after brick online.

Change-Id: If99eb3eb272dea0ed8c7b754dce675eb6efaf802
BUG: 841840
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4147
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Self-heald: Fix inode leak</title>
<updated>2012-08-30T10:25:50+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pranithk@gluster.com</email>
</author>
<published>2012-06-04T17:53:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e908ee20e8a87ba1170f228dd4dd5993f36a0da6'/>
<id>e908ee20e8a87ba1170f228dd4dd5993f36a0da6</id>
<content type='text'>
RCA:
There is an inode-leak because inode_link returns
linked inode by taking a reference. That needs to be
unreffed.

Fix:
Added the code to perform unrefs. In addition to that
updated the loc inode with the linked-inode because that is
the best practice. The code to update the input inode's
gfid can be removed later, its already removed in master.

Tests:
Checked that opendir comes with an loc with valid inode
Checked that re-opendir happens successfully. Tested index,
full self-heal work fine with the fix.

BUG: 826580
Change-Id: I0c68192ff98f76152ed112b393d497b8fee93355
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.org/3518
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RCA:
There is an inode-leak because inode_link returns
linked inode by taking a reference. That needs to be
unreffed.

Fix:
Added the code to perform unrefs. In addition to that
updated the loc inode with the linked-inode because that is
the best practice. The code to update the input inode's
gfid can be removed later, its already removed in master.

Tests:
Checked that opendir comes with an loc with valid inode
Checked that re-opendir happens successfully. Tested index,
full self-heal work fine with the fix.

BUG: 826580
Change-Id: I0c68192ff98f76152ed112b393d497b8fee93355
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.org/3518
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>afr: Avoid excessive logging in self-heal.</title>
<updated>2012-08-17T09:22:02+00:00</updated>
<author>
<name>Krishnan Parthasarathi</name>
<email>kparthas@redhat.com</email>
</author>
<published>2012-08-17T08:49:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=753f8c13245220c4b9ec6364a5e644274a36b1d6'/>
<id>753f8c13245220c4b9ec6364a5e644274a36b1d6</id>
<content type='text'>
- (Excessive) Logging has been very useful as 'bread-crumbs' in
  many a root-cause analyses. This patch aims at avoiding logging when
  the information could be reconstructed using the xattrs, statedump,
  and/or "volume heal" CLI commands.

Change-Id: I8f646cbee44e98495ea6963f9dfcae95375c8900
BUG: 844804
Signed-off-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3827
Reviewed-by: Pranith Kumar Karampuri &lt;pranithk@gluster.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- (Excessive) Logging has been very useful as 'bread-crumbs' in
  many a root-cause analyses. This patch aims at avoiding logging when
  the information could be reconstructed using the xattrs, statedump,
  and/or "volume heal" CLI commands.

Change-Id: I8f646cbee44e98495ea6963f9dfcae95375c8900
BUG: 844804
Signed-off-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3827
Reviewed-by: Pranith Kumar Karampuri &lt;pranithk@gluster.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/afr: Handle child_up &amp; fd not opened case in xaction</title>
<updated>2012-08-17T08:14:38+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pranithk@gluster.com</email>
</author>
<published>2012-07-30T15:31:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=1df75bc835a75f17fa0fcd3722ef68f05f5f3200'/>
<id>1df75bc835a75f17fa0fcd3722ef68f05f5f3200</id>
<content type='text'>
RCA:
When an fd is opened while a brick is down, after the brick
comes back up afr issues open on the other brick. It can
fail for a number of reasons (enoent etc). While the system
is in that state, inode/entrylks pre-op happen only on the
brick that is up and fd is opened for fd-fops. post-op should
consider only the bricks where both pre-op and fop succeeded
as success, rest of them as failures. Code now marks only the
children that are down as failures as opposed to child_down &amp;
fd-not-opened. This makes change-log appear as success on the
subvolume where we did not do any fop leading to no change-log
but differences in data/metadata for reg-files.

Fix:
Mark non-participants of fop as failure. This is tracked in
transaction.pre_op[].

Tests:
Simulated the scenario using err-gen on top of one of the client
xlator which fails all fops always. Performed fops and the changelog
represented pending fops on the brick with err-gen loaded. Tested
the case of brick down and perform entry/metadata/data operations
to confirm they still work as expected.

Change-Id: I41905936126b19abba56ca581c0301a894507e1a
BUG: 844987
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3776
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RCA:
When an fd is opened while a brick is down, after the brick
comes back up afr issues open on the other brick. It can
fail for a number of reasons (enoent etc). While the system
is in that state, inode/entrylks pre-op happen only on the
brick that is up and fd is opened for fd-fops. post-op should
consider only the bricks where both pre-op and fop succeeded
as success, rest of them as failures. Code now marks only the
children that are down as failures as opposed to child_down &amp;
fd-not-opened. This makes change-log appear as success on the
subvolume where we did not do any fop leading to no change-log
but differences in data/metadata for reg-files.

Fix:
Mark non-participants of fop as failure. This is tracked in
transaction.pre_op[].

Tests:
Simulated the scenario using err-gen on top of one of the client
xlator which fails all fops always. Performed fops and the changelog
represented pending fops on the brick with err-gen loaded. Tested
the case of brick down and perform entry/metadata/data operations
to confirm they still work as expected.

Change-Id: I41905936126b19abba56ca581c0301a894507e1a
BUG: 844987
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3776
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/afr: Avoid setting split-brain outside inode locks</title>
<updated>2012-08-13T04:51:39+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pranithk@gluster.com</email>
</author>
<published>2012-07-18T04:58:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=12aa31278c651f36c2ea1c0698ba789aa3f9262c'/>
<id>12aa31278c651f36c2ea1c0698ba789aa3f9262c</id>
<content type='text'>
RCA:
The bug is observed because the decision to mark
a file in split-brain is taken outside appropriate locks.
Lookup gathers xattrs outside any lock. The xattrs being
in split-brain in lookup should only be taken as a hint.
Appropriate inodelks should be taken before confirming
a split-brain. Self-heal confirms this at the moment.

Fix:
Self-heals are launched to inspect xattrs when the
data/metadata self-heal options are turned on.
Decision to set/reset split-brain flag is taken inside
appropriate locks.

Known Issue After fix:
If data/metadata self-heal is turned off, inspecting of
xattrs could not be performed so split-brain behavior
does not work correctly if the self-heal options are turned off.
This bug is handled only in upstream.

Change-Id: I59a43d5ce7bf9ca35bff54a51bf4cfa55d717a9e
BUG: 833727
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3691
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RCA:
The bug is observed because the decision to mark
a file in split-brain is taken outside appropriate locks.
Lookup gathers xattrs outside any lock. The xattrs being
in split-brain in lookup should only be taken as a hint.
Appropriate inodelks should be taken before confirming
a split-brain. Self-heal confirms this at the moment.

Fix:
Self-heals are launched to inspect xattrs when the
data/metadata self-heal options are turned on.
Decision to set/reset split-brain flag is taken inside
appropriate locks.

Known Issue After fix:
If data/metadata self-heal is turned off, inspecting of
xattrs could not be performed so split-brain behavior
does not work correctly if the self-heal options are turned off.
This bug is handled only in upstream.

Change-Id: I59a43d5ce7bf9ca35bff54a51bf4cfa55d717a9e
BUG: 833727
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3691
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster: fix crash on link of named pipe in stripe/replicate vol</title>
<updated>2012-08-09T15:10:20+00:00</updated>
<author>
<name>Brian Foster</name>
<email>bfoster@redhat.com</email>
</author>
<published>2012-07-25T12:14:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=475efecfba7194c598a94879852bcd37ac2deb5d'/>
<id>475efecfba7194c598a94879852bcd37ac2deb5d</id>
<content type='text'>
A crash occurs when attempting to link a named pipe on a striped,
replicated volume. The cause for this crash is attempting to deref
a NULL inode pointer in stripe_link_cbk(). The RCA for this bug
uncovered a couple of problems:

- AFR ignores the inode pointer it receives on failure (returning
  NULL).
- stripe assumes the inode pointer is valid on failure.

Either one of these changes addresses the crash, but this patch
includes both changes. AFR is modified to pass along the inode
pointer it receives (which could still be NULL). stripe is
modified to not assume the inode pointer is valid on fop failure.

BUG: 842825
Change-Id: I368849b7cfbb137a08ae5f89d26406814ff5bb09
Signed-off-by: Brian Foster &lt;bfoster@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3790
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A crash occurs when attempting to link a named pipe on a striped,
replicated volume. The cause for this crash is attempting to deref
a NULL inode pointer in stripe_link_cbk(). The RCA for this bug
uncovered a couple of problems:

- AFR ignores the inode pointer it receives on failure (returning
  NULL).
- stripe assumes the inode pointer is valid on failure.

Either one of these changes addresses the crash, but this patch
includes both changes. AFR is modified to pass along the inode
pointer it receives (which could still be NULL). stripe is
modified to not assume the inode pointer is valid on fop failure.

BUG: 842825
Change-Id: I368849b7cfbb137a08ae5f89d26406814ff5bb09
Signed-off-by: Brian Foster &lt;bfoster@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3790
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/afr: split-brain should be reset on data-self-heal</title>
<updated>2012-06-19T17:36:52+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pranithk@gluster.com</email>
</author>
<published>2012-06-15T06:51:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e2f1d73017894f893889b78135331355eb86836e'/>
<id>e2f1d73017894f893889b78135331355eb86836e</id>
<content type='text'>
If the govinda flag is set in the beginning then missing_entries_done
will fail the self-heal before it can come to data_self_heal.

Change-Id: I4d5b6a7c3bb26bae78979ee59c7c0997fd3fd84b
BUG: 832305
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3583
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the govinda flag is set in the beginning then missing_entries_done
will fail the self-heal before it can come to data_self_heal.

Change-Id: I4d5b6a7c3bb26bae78979ee59c7c0997fd3fd84b
BUG: 832305
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3583
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/afr: Treat EEXIST as success in hardlink</title>
<updated>2012-06-14T11:55:12+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pranithk@gluster.com</email>
</author>
<published>2012-06-12T14:09:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=27bc10d67b9502c03668ca851e8330485cb5e2b5'/>
<id>27bc10d67b9502c03668ca851e8330485cb5e2b5</id>
<content type='text'>
Change-Id: I6711fe9230553306eab6012edea8de157a336a78
BUG: 831151
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3549
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I6711fe9230553306eab6012edea8de157a336a78
BUG: 831151
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3549
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
