29.01.2013 Views

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

gpfsDataShipStart_t Structure<br />

flag before initiating data shipping, one of the participating nodes is chosen as the agent to which all<br />

appends are shipped. The aggregate performance of all the appending nodes is limited to the<br />

throughput of a single node in this case, but should still exceed what the performance would have been<br />

for appending small records without using data shipping.<br />

Data shipping mode imposes several restrictions on file usage:<br />

v Because an application level read or write may be split across several agents, POSIX read <strong>and</strong> write<br />

file atomicity is not enforced while in data shipping mode.<br />

v A file in data shipping mode cannot be written through any file h<strong>and</strong>le that was not associated with the<br />

data shipping collective through a <strong>GPFS</strong>_DATA_SHIP_START directive.<br />

v Calls that are not allowed on a file that has data shipping enabled:<br />

– chmod<br />

– fchmod<br />

– chown<br />

– fchown<br />

– link<br />

The <strong>GPFS</strong>_DATA_SHIP_START directive exits cleanly only when cancelled by a<br />

<strong>GPFS</strong>_DATA_SHIP_STOP directive. If all threads issue a close for the file, it is taken out of data shipping<br />

mode but errors are also returned.<br />

Members<br />

structLen Length of the gpfsDataShipStart_t structure.<br />

structType Structure identifier <strong>GPFS</strong>_DATA_SHIP_START<br />

numInstances The number of open file instances, on all nodes, collaborating to operate<br />

on the file.<br />

reserved This field is currently not used.<br />

For compatibility with future versions of <strong>GPFS</strong>, set this field to zero.<br />

Recovery<br />

Since <strong>GPFS</strong>_DATA_SHIP_START directives block their invoking threads until all participants respond<br />

accordingly, there needs to be a way to recover if the application program uses the wrong value for<br />

numInstances or one of the participating nodes crashes before issuing its <strong>GPFS</strong>_DATA_SHIP_START<br />

directive. While a gpfs_fcntl() subroutine is blocked waiting for other threads, the subroutine can be<br />

interrupted by any signal. If a signal is delivered to any of the waiting subroutines, all waiting subroutine on<br />

every node are interrupted <strong>and</strong> return EINTR. <strong>GPFS</strong> does not establish data shipping if such a signal<br />

occurs.<br />

It is the responsibility of the application to mask off any signals that might normally occur while waiting for<br />

another node in the data shipping collective. Several libraries use SIGALRM; the thread that makes the<br />

gpfs_fcntl() invocation should use sigthreadmask to mask off delivery of this signal while inside the<br />

subroutine.<br />

Error status<br />

EINTR A signal was delivered to a blocked gpfs_fcntl() subroutine. All waiting subroutines, on<br />

every node, are interrupted.<br />

EINVAL The file mode has been changed since the file was opened to include or exclude<br />

O_APPEND.<br />

350 <strong>GPFS</strong>: <strong>Administration</strong> <strong>and</strong> <strong>Programming</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!