Lines Matching refs:sft
48 sharefs_snap_create(shnode_t *sft)
59 if (sft->sharefs_snap) {
63 if (sft->sharefs_generation == sharetab_generation) {
69 ASSERT(sft->sharefs_size != 0);
70 kmem_free(sft->sharefs_snap, sft->sharefs_size + 1);
71 sft->sharefs_snap = NULL;
74 sft->sharefs_size = sharetab_size;
75 sft->sharefs_count = sharetab_count;
77 if (sft->sharefs_size == 0) {
83 sft->sharefs_snap = kmem_zalloc(sft->sharefs_size + 1, KM_SLEEP);
85 buf = sft->sharefs_snap;
100 sft->sharefs_size) {
136 sft->sharefs_snap_time = sharetab_snap_time;
137 sft->sharefs_generation = sharetab_generation;
139 ASSERT(iCount == sft->sharefs_count);
147 kmem_free(sft->sharefs_snap, sft->sharefs_size + 1);
148 sft->sharefs_size = 0;
149 sft->sharefs_count = 0;
150 sft->sharefs_snap = NULL;
163 shnode_t *sft = VTOSH(vp);
179 if (sft->sharefs_real_vp) {
185 vap->va_size = sft->sharefs_size;
186 vap->va_mtime = sft->sharefs_snap_time;
221 shnode_t *sft;
248 sft = VTOSH(vp);
254 atomic_inc_32(&sft->sharefs_refs);
255 sft->sharefs_real_vp = 0;
262 error = sharefs_snap_create(sft);
272 shnode_t *sft = VTOSH(vp);
279 if (sft->sharefs_snap != NULL) {
280 kmem_free(sft->sharefs_snap, sft->sharefs_size + 1);
281 sft->sharefs_size = 0;
282 sft->sharefs_snap = NULL;
283 sft->sharefs_generation = 0;
286 atomic_dec_32(&sft->sharefs_refs);
297 shnode_t *sft = VTOSH(vp);
309 error = sharefs_snap_create(sft);
317 if (len <= 0 || off >= sft->sharefs_size) {
322 if ((size_t)(off + len) > sft->sharefs_size)
323 len = sft->sharefs_size - off;
325 if (off < 0 || len > sft->sharefs_size) {
331 error = uiomove(sft->sharefs_snap + off,
344 shnode_t *sft;
346 sft = (shnode_t *)gfs_file_inactive(vp);
347 if (sft) {
349 if (sft->sharefs_snap != NULL) {
350 kmem_free(sft->sharefs_snap, sft->sharefs_size + 1);
353 kmem_free(sft, fp->gfs_size);
362 shnode_t *sft;
367 sft = VTOSH(vp);
369 sft->sharefs_real_vp = 1;