Lines Matching defs:sc

167 void gfs2_statfs_change_in(struct gfs2_statfs_change_host *sc, const void *buf)
171 sc->sc_total = be64_to_cpu(str->sc_total);
172 sc->sc_free = be64_to_cpu(str->sc_free);
173 sc->sc_dinodes = be64_to_cpu(str->sc_dinodes);
176 void gfs2_statfs_change_out(const struct gfs2_statfs_change_host *sc, void *buf)
180 str->sc_total = cpu_to_be64(sc->sc_total);
181 str->sc_free = cpu_to_be64(sc->sc_free);
182 str->sc_dinodes = cpu_to_be64(sc->sc_dinodes);
845 * @sc: the sc structure
851 struct gfs2_statfs_change_host *sc)
854 sc->sc_total += rgd->rd_data;
855 sc->sc_free += rgd->rd_free;
856 sc->sc_dinodes += rgd->rd_dinodes;
863 * @sc: the sc info that will be returned
873 static int gfs2_statfs_slow(struct gfs2_sbd *sdp, struct gfs2_statfs_change_host *sc)
882 memset(sc, 0, sizeof(struct gfs2_statfs_change_host));
907 error = statfs_slow_fill(rgd, sc);
941 * @sc: the sc structure
946 static int gfs2_statfs_i(struct gfs2_sbd *sdp, struct gfs2_statfs_change_host *sc)
953 *sc = *m_sc;
954 sc->sc_total += l_sc->sc_total;
955 sc->sc_free += l_sc->sc_free;
956 sc->sc_dinodes += l_sc->sc_dinodes;
960 if (sc->sc_free < 0)
961 sc->sc_free = 0;
962 if (sc->sc_free > sc->sc_total)
963 sc->sc_free = sc->sc_total;
964 if (sc->sc_dinodes < 0)
965 sc->sc_dinodes = 0;
982 struct gfs2_statfs_change_host sc;
990 error = gfs2_statfs_slow(sdp, &sc);
992 error = gfs2_statfs_i(sdp, &sc);
999 buf->f_blocks = sc.sc_total;
1000 buf->f_bfree = sc.sc_free;
1001 buf->f_bavail = sc.sc_free;
1002 buf->f_files = sc.sc_dinodes + sc.sc_free;
1003 buf->f_ffree = sc.sc_free;