mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 00:05:53 +02:00
[199552] fix deadlock with dstore-backed efs access
This commit is contained in:
parent
ebab655fd1
commit
292d091904
1 changed files with 18 additions and 18 deletions
|
@ -22,6 +22,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [191581] clear local IRemoteFile handle cache when modifying remote
|
* Martin Oberhuber (Wind River) - [191581] clear local IRemoteFile handle cache when modifying remote
|
||||||
* Martin Oberhuber (Wind River) - [197025][197167] Improved wait for model complete
|
* Martin Oberhuber (Wind River) - [197025][197167] Improved wait for model complete
|
||||||
* Martin Oberhuber (Wind River) - [191589] fix Rename by adding putInfo() for RSE EFS, and fetch symlink info
|
* Martin Oberhuber (Wind River) - [191589] fix Rename by adding putInfo() for RSE EFS, and fetch symlink info
|
||||||
|
* Martin Oberhuber (Wind River) - [199552] fix deadlock with dstore-backed efs access
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.efs;
|
package org.eclipse.rse.internal.efs;
|
||||||
|
@ -65,20 +66,20 @@ import org.eclipse.rse.ui.RSEUIPlugin;
|
||||||
*/
|
*/
|
||||||
public class RSEFileStoreImpl extends FileStore
|
public class RSEFileStoreImpl extends FileStore
|
||||||
{
|
{
|
||||||
private RSEFileStore _parent;
|
private RSEFileStore _store;
|
||||||
|
|
||||||
//cached IRemoteFile object: an Object to avoid early class loading
|
//cached IRemoteFile object: an Object to avoid early class loading
|
||||||
private transient IRemoteFile _remoteFile;
|
private transient volatile IRemoteFile _remoteFile;
|
||||||
|
|
||||||
//markup to know that RSE has been initialized
|
//markup to know that RSE has been initialized
|
||||||
private static boolean _initialized;
|
private static boolean _initialized;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor to use if the parent file store is known.
|
* Constructor to use if the file store handle is known.
|
||||||
* @param parent the parent file store.
|
* @param store the file store handle for this implementation object.
|
||||||
*/
|
*/
|
||||||
public RSEFileStoreImpl(RSEFileStore parent) {
|
public RSEFileStoreImpl(RSEFileStore store) {
|
||||||
_parent = parent;
|
_store = store;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -86,7 +87,7 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
* @see org.eclipse.core.filesystem.IFileStore#getChild(java.lang.String)
|
* @see org.eclipse.core.filesystem.IFileStore#getChild(java.lang.String)
|
||||||
*/
|
*/
|
||||||
public IFileStore getChild(String name) {
|
public IFileStore getChild(String name) {
|
||||||
return _parent.getChild(name);
|
return _store.getChild(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -94,7 +95,7 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
* @see org.eclipse.core.filesystem.IFileStore#getName()
|
* @see org.eclipse.core.filesystem.IFileStore#getName()
|
||||||
*/
|
*/
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return _parent.getName();
|
return _store.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -102,7 +103,7 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
* @see org.eclipse.core.filesystem.IFileStore#getParent()
|
* @see org.eclipse.core.filesystem.IFileStore#getParent()
|
||||||
*/
|
*/
|
||||||
public IFileStore getParent() {
|
public IFileStore getParent() {
|
||||||
return _parent.getParent();
|
return _store.getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -110,7 +111,7 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
* @see org.eclipse.core.filesystem.IFileStore#toURI()
|
* @see org.eclipse.core.filesystem.IFileStore#toURI()
|
||||||
*/
|
*/
|
||||||
public URI toURI() {
|
public URI toURI() {
|
||||||
return _parent.toURI();
|
return _store.toURI();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -270,7 +271,7 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
* @return an IRemoteFile for this file store
|
* @return an IRemoteFile for this file store
|
||||||
* @throws CoreException if connecting is not possible.
|
* @throws CoreException if connecting is not possible.
|
||||||
*/
|
*/
|
||||||
private synchronized IRemoteFile getRemoteFileObject(IProgressMonitor monitor, boolean forceExists) throws CoreException {
|
private IRemoteFile getRemoteFileObject(IProgressMonitor monitor, boolean forceExists) throws CoreException {
|
||||||
IRemoteFile remoteFile = getCachedRemoteFile();
|
IRemoteFile remoteFile = getCachedRemoteFile();
|
||||||
if (remoteFile!=null) {
|
if (remoteFile!=null) {
|
||||||
if (remoteFile.getParentRemoteFileSubSystem().isConnected()) {
|
if (remoteFile.getParentRemoteFileSubSystem().isConnected()) {
|
||||||
|
@ -282,7 +283,7 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RSEFileStore parentStore = _parent.getParentStore();
|
RSEFileStore parentStore = _store.getParentStore();
|
||||||
if (parentStore!=null) {
|
if (parentStore!=null) {
|
||||||
//Handle was created naming a parent file store
|
//Handle was created naming a parent file store
|
||||||
IRemoteFile parent = parentStore.getImpl().getRemoteFileObject(monitor, forceExists);
|
IRemoteFile parent = parentStore.getImpl().getRemoteFileObject(monitor, forceExists);
|
||||||
|
@ -300,10 +301,9 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//Handle was created with an absolute name
|
//Handle was created with an absolute name
|
||||||
IRemoteFileSubSystem subSys = RSEFileStoreImpl.getConnectedFileSubSystem(_parent.getHost(), monitor);
|
IRemoteFileSubSystem subSys = RSEFileStoreImpl.getConnectedFileSubSystem(_store.getHost(), monitor);
|
||||||
try {
|
try {
|
||||||
//TODO method missing a progressmonitor!
|
remoteFile = subSys.getRemoteFileObject(_store.getAbsolutePath(), monitor);
|
||||||
remoteFile = subSys.getRemoteFileObject(_parent.getAbsolutePath(), monitor);
|
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
throw new CoreException(new Status(
|
throw new CoreException(new Status(
|
||||||
|
@ -484,7 +484,7 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
IRemoteFile remoteFile = getRemoteFileObject(monitor, false);
|
IRemoteFile remoteFile = getRemoteFileObject(monitor, false);
|
||||||
String classification = (remoteFile==null) ? null : remoteFile.getClassification();
|
String classification = (remoteFile==null) ? null : remoteFile.getClassification();
|
||||||
|
|
||||||
FileInfo info = new FileInfo(_parent.getName());
|
FileInfo info = new FileInfo(_store.getName());
|
||||||
if (remoteFile == null || !remoteFile.exists()) {
|
if (remoteFile == null || !remoteFile.exists()) {
|
||||||
info.setExists(false);
|
info.setExists(false);
|
||||||
//broken symbolic link handling
|
//broken symbolic link handling
|
||||||
|
@ -630,7 +630,7 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
Activator.getDefault().getBundle().getSymbolicName(),
|
Activator.getDefault().getBundle().getSymbolicName(),
|
||||||
"The directory could not be created", e));
|
"The directory could not be created", e));
|
||||||
}
|
}
|
||||||
return _parent;
|
return _store;
|
||||||
}
|
}
|
||||||
else if (remoteFile.isFile()) {
|
else if (remoteFile.isFile()) {
|
||||||
throw new CoreException(new Status(IStatus.ERROR,
|
throw new CoreException(new Status(IStatus.ERROR,
|
||||||
|
@ -638,7 +638,7 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
"A file of that name already exists"));
|
"A file of that name already exists"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return _parent;
|
return _store;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue