Skip to content

Commit

Permalink
pnfsmanager: Addresses compatibility issue with pre 2.6 pools
Browse files Browse the repository at this point in the history
Address a compatibility issue that prevents the use of the 'rh restore' command
in pre 2.6 pools when used with a 2.6 pnfsmanager.

Target: 2.6
Require-notes: yes
Require-book: no
Patch: http://rb.dcache.org/r/5679/
Acked-by: Albert Rossi <arossi@fnal.gov>
  • Loading branch information
gbehrmann committed Jun 27, 2013
1 parent 3318988 commit d023179
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public PnfsGetStorageInfoMessage(PnfsId pnfsId)
@Override
public void setFileAttributes(FileAttributes fileAttributes)
{
// For compatibility with pre 2.6 pools: 'rh restore' issues a PnfsGetStorageInfoMessage
// and expects the size to be part of the storage info.
if (fileAttributes.isDefined(STORAGEINFO) && fileAttributes.isDefined(SIZE)) {
fileAttributes.getStorageInfo().setLegacySize(fileAttributes.getSize());
}
super.setFileAttributes(fileAttributes);
}

Expand Down

0 comments on commit d023179

Please sign in to comment.