Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
215b8a88
Commit
215b8a88
authored
Feb 26, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grf: small optimize
parent
672d0b47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
grf
gluster/grf
+14
-2
No files found.
gluster/grf
View file @
215b8a88
...
@@ -87,6 +87,10 @@ if [ "$1" = "--list" ] ; then
...
@@ -87,6 +87,10 @@ if [ "$1" = "--list" ] ; then
uselist
=
"
$1
"
uselist
=
"
$1
"
# hack for detect
# hack for detect
sfile
=
$(
cat
"
$uselist
"
|
grep
^/ |
head
-n1
)
sfile
=
$(
cat
"
$uselist
"
|
grep
^/ |
head
-n1
)
if
[
-z
"
$sfile
"
]
;
then
echo
"Skip empty file
$uselist
"
exit
0
fi
fi
fi
...
@@ -277,6 +281,8 @@ fi
...
@@ -277,6 +281,8 @@ fi
OLDFILE
=
OLDFILE
=
SELFILE
=
SELFILE
=
SELHOST
=
SELPATH
=
if
[
"
$restore
"
=
"--restore"
]
;
then
if
[
"
$restore
"
=
"--restore"
]
;
then
COUNT
=
1
COUNT
=
1
FILNUM
=
0
FILNUM
=
0
...
@@ -293,8 +299,8 @@ if [ "$restore" = "--restore" ] ; then
...
@@ -293,8 +299,8 @@ if [ "$restore" = "--restore" ] ; then
if
opbrick
"test -s"
"
$file
"
;
then
if
opbrick
"test -s"
"
$file
"
;
then
OLDFILE
=
"
$WORKDIR
/
$host
-
$COUNT
"
OLDFILE
=
"
$WORKDIR
/
$host
-
$COUNT
"
SELFILE
=
"
$file
"
SELFILE
=
"
$file
"
# FIXME: overhead, but we need host and path vars
SELHOST
=
$host
GENGFID
=
$(
get_gfid
"
$SELFILE
"
)
SELPATH
=
$path
echo
"Select OLDFILE:
$OLDFILE
(
$file
)"
echo
"Select OLDFILE:
$OLDFILE
(
$file
)"
fi
fi
fi
fi
...
@@ -322,6 +328,12 @@ if [ "$restore" = "--restore" ] ; then
...
@@ -322,6 +328,12 @@ if [ "$restore" = "--restore" ] ; then
if
[
-n
"
$OLDFILE
"
]
;
then
if
[
-n
"
$OLDFILE
"
]
;
then
# get best gfid
# we need host and path vars for get_gfid
host
=
$SELHOST
path
=
$SELPATH
GENGFID
=
$(
get_gfid
"
$SELFILE
"
)
COUNT
=
1
COUNT
=
1
for
i
in
$LISTBRICKS
;
do
for
i
in
$LISTBRICKS
;
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment