method renamed to use the same semantic like duperemove (dedupe_extent)

This commit is contained in:
Denis Knauf 2021-09-06 09:48:16 +02:00
parent 3cc57e2e78
commit 01b3ebe04f
2 changed files with 11 additions and 11 deletions

View file

@ -9,14 +9,13 @@ Gem::Specification.new do |s|
s.homepage = 'https://git.denkn.at/deac/deduperemoverb'
s.summary = 'Deduplication of file junks of found files by deduperemove.'
s.files =
FileList[
'lib/**/*.rb',
'bin/*',
'Gemfile',
'Gemfile.lock',
'ext/*/*.c',
'ext/*/extconf.rb'
]
FileList[ %w[
lib/**/*.rb
bin/*
Gemfile Gemfile.lock
ext/*/*.c ext/*/extconf.rb
]]
s.bindir = %w[bin]
s.require_paths = %w[lib]
s.extensions = %w[ext/deduperemoverb/extconf.rb]
@ -24,5 +23,6 @@ Gem::Specification.new do |s|
s.add_dependency "ffi", '~> 1.15'
s.add_dependency "sqlite3", '~> 1.4'
#s.install_tasks name: 'compile'
s.requirements << 'cc'
s.requirements << 'ruby-dev'
end

View file

@ -111,7 +111,7 @@ class Duperemove
end
def self.duperemove fd, offset, length, dupes
def self.dedupe_extent fd, offset, length, dupes
rr = FileDedupeRange[dupes.size].new offset, length
fds = []
dupes.each_with_index do |(fd,os),i|
@ -224,7 +224,7 @@ class Duperemove
begin
t1 = Time.now
rs =
Duperemove.duperemove fst.file,
Duperemove.dedupe_extent fst.file,
fst.offset,
[ fst.size - fst.offset, block_size ].min,
fs.map {|f| [f.file, f.offset] }.to_h