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

Changes for CA-196882, FileSR and GC changes #295

Closed
wants to merge 1 commit into from

Conversation

MarkSymsCtx
Copy link
Contributor

GC in batch mode and deletes done immediately in SRs
FileSR performs VDI.delete inline
Inline delete VDIs for LVHD SRs
GC waits five minutes after start before initiating work loop.
Use two locks in gcLoop, one to prevent multiple GC processs starting
and one to interlink with abort requests while work is actually occuring.
Inline delete orphaned nodes in coalesce
After handling garbage in the GC loop proceed to coalesce without returning
to scan and potentially finding more garbage whcih then prevents coalesce.

Fix bug in _kickGC where the running GC could be stopped but not start
a new one.

Signed-off-by: Mark Syms mark.syms@citrix.com

@@ -2752,7 +2771,7 @@ def should_preempt(session, srUuid):
if len(entries) == 0:
return False
elif len(entries) > 1:
raise util.SMException("More than one coalesce entry: " + entries)
raise util.SMException("More than one coalesce entry: " + len(entries))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the purpose of the old code was to list the entries, not just report the number

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update to replace len with str.

@germanop
Copy link
Contributor

Apart from this, code is fine

@MarkSymsCtx MarkSymsCtx force-pushed the CA-196882 branch 2 times, most recently from 87cffdc to 74609b1 Compare February 17, 2016 09:28
@@ -2741,8 +2760,8 @@ def get_state(srUuid):
locking.
"""
init(srUuid)
if lockRunning.acquireNoblock():
lockRunning.release()
if lockActive.acquireNoblock():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was not here in the previous version.
What do we want to tell the user: if it is spawned or actively running?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spawned, this was in the patch queue but missed from the push. This is what caused the BVT to fail in the first submission.

@germanop
Copy link
Contributor

About the commit message: I appreciate it is the squash of the two previous commits but the
first line should convey both info not just the one from the first commit squashed.

Let's find a one line title that captures the nature of the fix.
If there is one CA ticket more descriptive than the other, use that only but the first
line should describe the change in its entirety.

Something like "GC in batch mode and deletes done immediately in SRs", for example.
You know better.

FileSR performs VDI.delete inline
Inline delete VDIs for LVHD SRs
GC waits five minutes after start before initiating work loop.
Use two locks in gcLoop, one to prevent multiple GC processs starting
and one to interlink with abort requests while work is actually occuring.
Inline delete orphaned nodes in coalesce
After handling garbage in the GC loop proceed to coalesce without returning
to scan and potentially finding more garbage whcih then prevents coalesce.

Fix bug in _kickGC where the running GC could be stopped but not start
a new one.

Signed-off-by: Mark Syms <mark.syms@citrix.com>
@germanop germanop closed this in 9d82cec Feb 18, 2016
@MarkSymsCtx MarkSymsCtx deleted the CA-196882 branch June 13, 2016 11:04
andrey-podko pushed a commit to andrey-podko/sm that referenced this pull request Aug 16, 2022
FileSR performs VDI.delete inline
Inline delete VDIs for LVHD SRs
GC waits five minutes after start before initiating work loop.
Use two locks in gcLoop, one to prevent multiple GC processs starting
and one to interlink with abort requests while work is actually occuring.
Inline delete orphaned nodes in coalesce
After handling garbage in the GC loop proceed to coalesce without returning
to scan and potentially finding more garbage whcih then prevents coalesce.

Fix bug in _kickGC where the running GC could be stopped but not start
a new one.

Reviewed-by: Germano Percossi <germano.percossi@citrix.com>

GitHub: closes xapi-project#295
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants