Lines Matching defs:sft
50 sharefs_snap_create(shnode_t *sft)
61 if (sft->sharefs_snap) {
65 if (sft->sharefs_generation == sharetab_generation) {
71 ASSERT(sft->sharefs_size != 0);
72 kmem_free(sft->sharefs_snap, sft->sharefs_size + 1);
73 sft->sharefs_snap = NULL;
76 sft->sharefs_size = sharetab_size;
77 sft->sharefs_count = sharetab_count;
79 if (sft->sharefs_size == 0) {
85 sft->sharefs_snap = kmem_zalloc(sft->sharefs_size + 1, KM_SLEEP);
87 buf = sft->sharefs_snap;
102 sft->sharefs_size) {
138 sft->sharefs_snap_time = sharetab_snap_time;
139 sft->sharefs_generation = sharetab_generation;
141 ASSERT(iCount == sft->sharefs_count);
149 kmem_free(sft->sharefs_snap, sft->sharefs_size + 1);
150 sft->sharefs_size = 0;
151 sft->sharefs_count = 0;
152 sft->sharefs_snap = NULL;
165 shnode_t *sft = VTOSH(vp);
181 if (sft->sharefs_real_vp) {
187 vap->va_size = sft->sharefs_size;
188 vap->va_mtime = sft->sharefs_snap_time;
223 shnode_t *sft;
250 sft = VTOSH(vp);
256 atomic_add_32(&sft->sharefs_refs, 1);
257 sft->sharefs_real_vp = 0;
264 error = sharefs_snap_create(sft);
274 shnode_t *sft = VTOSH(vp);
281 if (sft->sharefs_snap != NULL) {
282 kmem_free(sft->sharefs_snap, sft->sharefs_size + 1);
283 sft->sharefs_size = 0;
284 sft->sharefs_snap = NULL;
285 sft->sharefs_generation = 0;
288 atomic_add_32(&sft->sharefs_refs, -1);
299 shnode_t *sft = VTOSH(vp);
311 error = sharefs_snap_create(sft);
319 if (len <= 0 || off >= sft->sharefs_size) {
324 if ((size_t)(off + len) > sft->sharefs_size)
325 len = sft->sharefs_size - off;
327 if (off < 0 || len > sft->sharefs_size) {
333 error = uiomove(sft->sharefs_snap + off,
346 shnode_t *sft;
348 sft = (shnode_t *)gfs_file_inactive(vp);
349 if (sft) {
351 if (sft->sharefs_snap != NULL) {
352 kmem_free(sft->sharefs_snap, sft->sharefs_size + 1);
355 kmem_free(sft, fp->gfs_size);
364 shnode_t *sft;
369 sft = VTOSH(vp);
371 sft->sharefs_real_vp = 1;